diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-09-14 11:47:31 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-09-14 11:52:17 +0200 |
commit | 5268e471d239e6cb00b07a3a4ee6be71284fc28e (patch) | |
tree | 0d3a5835eb976d4ad8b05767159134927badc59d | |
parent | f98eaa0ebd343549e44ae7f6b7f79ac4e1377456 (diff) |
Reverse default configuration set in deinit
-rw-r--r-- | bdep/deinit.cxx | 11 | ||||
-rw-r--r-- | tests/update.testscript | 8 |
2 files changed, 15 insertions, 4 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 diff --git a/tests/update.testscript b/tests/update.testscript index 3823b9d..39d20ae 100644 --- a/tests/update.testscript +++ b/tests/update.testscript @@ -122,12 +122,12 @@ deinit += -d prj $deinit 2>>/"EOE" deinitializing in project $~/prj/ - in configuration @cfg1: - synchronizing: - drop pkg1 - in configuration @cfg2: synchronizing: drop pkg2 + + in configuration @cfg1: + synchronizing: + drop pkg1 EOE } |