From 5268e471d239e6cb00b07a3a4ee6be71284fc28e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 14 Sep 2021 11:47:31 +0200 Subject: Reverse default configuration set in deinit --- bdep/deinit.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'bdep') 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 -- cgit v1.1