aboutsummaryrefslogtreecommitdiff
path: root/bpkg/rep-create.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-11-12 14:38:43 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-11-13 13:29:12 +0300
commit0e31447976e338956f4aef98930f2f28261d9983 (patch)
tree7518c5c288ff7196e5eae3521e4d17f5dab884f9 /bpkg/rep-create.cxx
parente59343b3267e82aff33a8f73ab82b51345913c06 (diff)
Add pkg-verify --deep option
Diffstat (limited to 'bpkg/rep-create.cxx')
-rw-r--r--bpkg/rep-create.cxx38
1 files changed, 3 insertions, 35 deletions
diff --git a/bpkg/rep-create.cxx b/bpkg/rep-create.cxx
index ad63267..16f6496 100644
--- a/bpkg/rep-create.cxx
+++ b/bpkg/rep-create.cxx
@@ -15,7 +15,6 @@
#include <bpkg/auth.hxx>
#include <bpkg/fetch.hxx>
-#include <bpkg/archive.hxx>
#include <bpkg/checksum.hxx>
#include <bpkg/diagnostics.hxx>
#include <bpkg/manifest-utility.hxx>
@@ -99,7 +98,9 @@ namespace bpkg
// Verify archive is a package and get its manifest.
//
path a (d / p);
- package_manifest m (pkg_verify (o, a, o.ignore_unknown ()));
+
+ package_manifest m (
+ pkg_verify (o, a, true /* expand_values */, o.ignore_unknown ()));
// Calculate its checksum.
//
@@ -112,39 +113,6 @@ namespace bpkg
//
m.location = a.leaf (root);
- dir_path pd (m.name.string () + "-" + m.version.string ());
-
- // Expand the description-file manifest value.
- //
- if (m.description && m.description->file)
- {
- path f (pd / m.description->path);
- string s (extract (o, a, f));
-
- if (s.empty ())
- fail << "description-file value in manifest of package archive "
- << a << " references empty file " << f;
-
- m.description = text_file (move (s));
- }
-
- // Expand the changes-file manifest values.
- //
- for (auto& c: m.changes)
- {
- if (c.file)
- {
- path f (pd / c.path);
- string s (extract (o, a, f));
-
- if (s.empty ())
- fail << "changes-file value in manifest of package archive " << a
- << " references empty file " << f;
-
- c = text_file (move (s));
- }
- }
-
package_key k {m.name, m.version}; // Argument evaluation order.
auto r (map.emplace (move (k), package_data {a, move (m)}));