From 546391dab6173660acceba6404136e9411ce1388 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 1 Feb 2023 11:42:31 +0200 Subject: Implement system package manager query and install support for Debian --- bpkg/package-query.hxx | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'bpkg/package-query.hxx') 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, - lazy_shared_ptr>> + available_packages find_available (const linked_databases&, const package_name&, const optional&); @@ -94,8 +93,8 @@ namespace bpkg using config_repo_fragments = database_map>>; - vector, - lazy_shared_ptr>> + + available_packages find_available (const package_name&, const optional&, const config_repo_fragments&, @@ -173,6 +172,20 @@ namespace bpkg database&, const shared_ptr&); + // 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 -- cgit v1.1