diff options
Diffstat (limited to 'bpkg')
-rw-r--r-- | bpkg/rep-create.cxx | 13 | ||||
-rw-r--r-- | bpkg/rep-fetch.cxx | 2 | ||||
-rw-r--r-- | bpkg/rep-info.cxx | 6 |
3 files changed, 13 insertions, 8 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 diff --git a/bpkg/rep-fetch.cxx b/bpkg/rep-fetch.cxx index def7cd0..daefc84 100644 --- a/bpkg/rep-fetch.cxx +++ b/bpkg/rep-fetch.cxx @@ -107,7 +107,7 @@ namespace bpkg authenticate_repository (co, conf, cert_pem, *cert, sm, rl); } - return rep_fetch_data {{move (fr)}, move (cert_pem), move (cert)}; + return rep_fetch_data {{move (fr)}, cert_pem, move (cert)}; } template <typename M> diff --git a/bpkg/rep-info.cxx b/bpkg/rep-info.cxx index 1ffeee3..f136aad 100644 --- a/bpkg/rep-info.cxx +++ b/bpkg/rep-info.cxx @@ -168,11 +168,9 @@ namespace bpkg // Append the latest base repository manifest. // - // Note that there must be at least one fragment with at least a - // base repository being present. + // Note that there must be at least one fragment. // - assert (!rfd.fragments.empty () && - !rfd.fragments.back ().repositories.empty ()); + assert (!rfd.fragments.empty ()); rms.push_back ( find_base_repository (rfd.fragments.back ().repositories)); |