aboutsummaryrefslogtreecommitdiff
path: root/bpkg/package-query.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2023-07-31 22:01:32 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2023-08-04 13:01:50 +0300
commitfbaa48b8ebf22d97bb224444603523ed03b98854 (patch)
tree9eb6447e31c29697b11910e704883bcdc649314e /bpkg/package-query.cxx
parent7a8652e41637085ddf090db27c193b02a99bc679 (diff)
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.
Diffstat (limited to 'bpkg/package-query.cxx')
-rw-r--r--bpkg/package-query.cxx14
1 files changed, 9 insertions, 5 deletions
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<shared_ptr<available_package>> imaginary_stubs;
shared_ptr<available_package>
@@ -27,16 +29,16 @@ namespace bpkg
return i != imaginary_stubs.end () ? *i : nullptr;
}
+ // Search in the existing packages registry.
+ //
vector<pair<reference_wrapper<database>,
shared_ptr<available_package>>> existing_packages;
pair<shared_ptr<available_package>, lazy_shared_ptr<repository_fragment>>
- find_existing (const package_name& name,
- const optional<version_constraint>& c,
- const lazy_shared_ptr<repository_fragment>& rf)
+ find_existing (database& db,
+ const package_name& name,
+ const optional<version_constraint>& c)
{
- database& db (rf.database ());
-
pair<shared_ptr<available_package>,
lazy_shared_ptr<repository_fragment>> r;
@@ -55,6 +57,8 @@ namespace bpkg
return r;
}
+ // Search in real repositories.
+ //
linked_databases repo_configs;
linked_databases