aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-drop.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-03-21 21:40:28 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-04-19 19:39:55 +0300
commit15dff3c592385466406732cd6ced809dc28cf2e2 (patch)
tree1da9f0738293eb7906d92ab010a79c689087b655 /bpkg/pkg-drop.cxx
parent46842f6cf74d085ced382dd0c187f6a7a578913c (diff)
Implement build plan simulation
Diffstat (limited to 'bpkg/pkg-drop.cxx')
-rw-r--r--bpkg/pkg-drop.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/bpkg/pkg-drop.cxx b/bpkg/pkg-drop.cxx
index a238803..0127fb6 100644
--- a/bpkg/pkg-drop.cxx
+++ b/bpkg/pkg-drop.cxx
@@ -353,11 +353,11 @@ namespace bpkg
// Each package is disfigured in its own transaction, so that we always
// leave the configuration in a valid state.
//
- transaction t (db.begin ());
+ transaction t (db);
// Commits the transaction.
//
- pkg_disfigure (c, o, t, p, true /* clean */);
+ pkg_disfigure (c, o, t, p, true /* clean */, false /* simulate */);
assert (p->state == package_state::unpacked ||
p->state == package_state::transient);
@@ -388,8 +388,11 @@ namespace bpkg
assert (p->state == package_state::fetched ||
p->state == package_state::unpacked);
- transaction t (db.begin ());
- pkg_purge (c, t, p); // Commits the transaction, p is now transient.
+ transaction t (db);
+
+ // Commits the transaction, p is now transient.
+ //
+ pkg_purge (c, t, p, false /* simulate */);
if (verb && !o.no_result ())
text << "purged " << p->name;
@@ -444,7 +447,7 @@ namespace bpkg
//
bool print_plan (false);
{
- transaction t (db.begin ());
+ transaction t (db);
// The first step is to load and collect all the packages specified
// by the user.
@@ -586,7 +589,7 @@ namespace bpkg
//
drop_packages pkgs;
{
- transaction t (db.begin ());
+ transaction t (db);
// First add all the "caller selection" of packages to the list and
// collect their prerequisites (these will be the candidates to drop