diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-05-03 17:19:19 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-05-03 17:34:27 +0300 |
commit | 06c76d48163efb5a6a9bb4340723baf7a3a0a41c (patch) | |
tree | 15e8b4b0774a3ca2b659e7acc497a51ea978caa9 /bpkg/rep-create.cxx | |
parent | d4e409e3ceb7eadd9cf94b1d1f99ac04fec570ee (diff) |
Adapt to optional base repository manifest
Diffstat (limited to 'bpkg/rep-create.cxx')
-rw-r--r-- | bpkg/rep-create.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/bpkg/rep-create.cxx b/bpkg/rep-create.cxx index 2de1de1..34aeb2c 100644 --- a/bpkg/rep-create.cxx +++ b/bpkg/rep-create.cxx @@ -5,6 +5,7 @@ #include <bpkg/rep-create.hxx> #include <map> +#include <algorithm> // count_if() #include <libbutl/filesystem.mxx> // dir_iterator #include <libbutl/manifest-serializer.mxx> @@ -180,13 +181,19 @@ namespace bpkg l4 ([&]{trace << "creating repository in " << d;}); - // Load the repositories.manifest file to make sure it is there and is - // valid. + // Load the repositories.manifest file to obtain the certificate, if + // present, for signing the repository. // pkg_repository_manifests rms ( pkg_fetch_repositories (d, o.ignore_unknown ())); - l4 ([&]{trace << rms.size () - 1 << " prerequisite repository(s)";}); + l4 ([&]{trace << count_if (rms.begin(), rms.end(), + [] (const repository_manifest& i) + { + return i.effective_role () != + repository_role::base; + }) + << " prerequisite repository(s)";}); // While we could have serialized as we go along, the order of // packages will be pretty much random and not reproducible. By |