diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-02-01 11:42:31 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-02-01 11:42:31 +0200 |
commit | 546391dab6173660acceba6404136e9411ce1388 (patch) | |
tree | 79da333fd1f7447c6b9490565f520d1d79a329b7 /bpkg/package-query.hxx | |
parent | 724131b7e03934664621f86df2dc2285ff43dba8 (diff) |
Implement system package manager query and install support for Debian
Diffstat (limited to 'bpkg/package-query.hxx')
-rw-r--r-- | bpkg/package-query.hxx | 25 |
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 |