aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-drop
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-02-13 16:30:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-02-13 16:30:31 +0200
commit74bcab9dfa50647dd6615f261f2c2bc9f5a38951 (patch)
tree3cd60a784ff8a16b58ddd2ec4bb12003e9d11719 /bpkg/pkg-drop
parent4fd0df2573341824eea5edfaf45be33997ce56ce (diff)
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.
Diffstat (limited to 'bpkg/pkg-drop')
-rw-r--r--bpkg/pkg-drop13
1 files changed, 13 insertions, 0 deletions
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 <set>
+
#include <bpkg/types>
+#include <bpkg/forward> // database, selected_package
#include <bpkg/utility>
#include <bpkg/pkg-drop-options>
@@ -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<shared_ptr<selected_package>>&,
+ bool prompt);
}
#endif // BPKG_PKG_DROP