aboutsummaryrefslogtreecommitdiff
path: root/bdep
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-09-14 11:47:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-09-14 11:52:17 +0200
commit5268e471d239e6cb00b07a3a4ee6be71284fc28e (patch)
tree0d3a5835eb976d4ad8b05767159134927badc59d /bdep
parentf98eaa0ebd343549e44ae7f6b7f79ac4e1377456 (diff)
Reverse default configuration set in deinit
Diffstat (limited to 'bdep')
-rw-r--r--bdep/deinit.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/bdep/deinit.cxx b/bdep/deinit.cxx
index 90447ad..777e162 100644
--- a/bdep/deinit.cxx
+++ b/bdep/deinit.cxx
@@ -131,6 +131,17 @@ namespace bdep
verify_project_packages (pp, cs);
cfgs = move (cs.first);
+
+ // If this is fallback to default configurations, then reverse them:
+ // this adds a bit of magic to typical tool/module development setups
+ // where we normally create/initialize the host/build2 configuration
+ // first and which needs to be deinitialized last.
+ //
+ // @@ TODO: maybe we should deinitialize/sync them all at once if they
+ // belong to the same configuration cluster?
+ //
+ if (cs.second)
+ reverse (cfgs.begin (), cfgs.end ());
}
// If no packages were explicitly specified, then we deinitalize all that