aboutsummaryrefslogtreecommitdiff
path: root/bpkg/package-query.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/package-query.hxx')
-rw-r--r--bpkg/package-query.hxx25
1 files changed, 19 insertions, 6 deletions
diff --git a/bpkg/package-query.hxx b/bpkg/package-query.hxx
index ebe92ac..ee9b595 100644
--- a/bpkg/package-query.hxx
+++ b/bpkg/package-query.hxx
@@ -75,14 +75,13 @@ namespace bpkg
// Try to find packages that optionally satisfy the specified version
// constraint in multiple databases, suppressing duplicates. Return the list
// of packages and repository fragments in which each was found in the
- // package version descending or empty list if none were found. Note that a
- // stub satisfies any constraint.
+ // package version descending order or empty list if none were found. Note
+ // that a stub satisfies any constraint.
//
// Note that we return (loaded) lazy_shared_ptr in order to also convey
// the database to which it belongs.
//
- vector<pair<shared_ptr<available_package>,
- lazy_shared_ptr<repository_fragment>>>
+ available_packages
find_available (const linked_databases&,
const package_name&,
const optional<version_constraint>&);
@@ -94,8 +93,8 @@ namespace bpkg
using config_repo_fragments =
database_map<vector<shared_ptr<repository_fragment>>>;
- vector<pair<shared_ptr<available_package>,
- lazy_shared_ptr<repository_fragment>>>
+
+ available_packages
find_available (const package_name&,
const optional<version_constraint>&,
const config_repo_fragments&,
@@ -173,6 +172,20 @@ namespace bpkg
database&,
const shared_ptr<selected_package>&);
+ // Try to find packages in multiple databases, traversing the explicitly and
+ // implicitly linked databases recursively and suppressing duplicates and,
+ // optionally, older package revisions. Return the list of packages and
+ // repository fragments in which each was found in the package version
+ // descending order or empty list if none were found.
+ //
+ // Note that we return (loaded) lazy_shared_ptr in order to also convey
+ // the database to which it belongs.
+ //
+ available_packages
+ find_available_all (const linked_databases&,
+ const package_name&,
+ bool suppress_older_revisions = true);
+
// Create a transient (or fake, if you prefer) available_package object
// corresponding to the specified selected object. Note that the package
// locations list is left empty and that the returned repository fragment