From 74bcab9dfa50647dd6615f261f2c2bc9f5a38951 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 13 Feb 2016 16:30:31 +0200 Subject: Offer in pkg-build to drop prerequisite packages that are no longer necessary This can happen if a package that is being upgraded/downgraded changes its dependencies. --- bpkg/pkg-drop | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bpkg/pkg-drop') diff --git a/bpkg/pkg-drop b/bpkg/pkg-drop index ea19e11..4b7931e 100644 --- a/bpkg/pkg-drop +++ b/bpkg/pkg-drop @@ -5,7 +5,10 @@ #ifndef BPKG_PKG_DROP #define BPKG_PKG_DROP +#include + #include +#include // database, selected_package #include #include @@ -14,6 +17,16 @@ namespace bpkg { int pkg_drop (const pkg_drop_options&, cli::scanner& args); + + // Examine the list of prerequisite packages and drop those that don't + // have any dependents. Note that it should be called in session. + // + void + pkg_drop (const dir_path& configuration, + const common_options&, + database&, + const std::set>&, + bool prompt); } #endif // BPKG_PKG_DROP -- cgit v1.1