From fbaa48b8ebf22d97bb224444603523ed03b98854 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 31 Jul 2023 22:01:32 +0300 Subject: Add support for specifying package archive and directory as a dependency for pkg-build Also make sure that a package specified as an archive or directory always replaces selected package. Also add support for deorphaning and upgrading of such a package. --- bpkg/package-query.cxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'bpkg/package-query.cxx') diff --git a/bpkg/package-query.cxx b/bpkg/package-query.cxx index 0c6d459..871b4fb 100644 --- a/bpkg/package-query.cxx +++ b/bpkg/package-query.cxx @@ -13,6 +13,8 @@ using namespace std; namespace bpkg { + // Search in the imaginary system repository. + // vector> imaginary_stubs; shared_ptr @@ -27,16 +29,16 @@ namespace bpkg return i != imaginary_stubs.end () ? *i : nullptr; } + // Search in the existing packages registry. + // vector, shared_ptr>> existing_packages; pair, lazy_shared_ptr> - find_existing (const package_name& name, - const optional& c, - const lazy_shared_ptr& rf) + find_existing (database& db, + const package_name& name, + const optional& c) { - database& db (rf.database ()); - pair, lazy_shared_ptr> r; @@ -55,6 +57,8 @@ namespace bpkg return r; } + // Search in real repositories. + // linked_databases repo_configs; linked_databases -- cgit v1.1