From 5b84b34eb1c4c49607a0d14706b15a6923f1ab0c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 26 Aug 2021 11:40:35 +0200 Subject: Print diagnostics about empty configurations after "in configuration ...:" In particular, this makes sure they are separated with blank lines. --- bdep/deinit.cxx | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'bdep/deinit.cxx') diff --git a/bdep/deinit.cxx b/bdep/deinit.cxx index 00eba45..90447ad 100644 --- a/bdep/deinit.cxx +++ b/bdep/deinit.cxx @@ -166,35 +166,34 @@ namespace bdep ps.push_back (s.name.string ()); } + // If we are printing multiple configurations, separate them with a + // blank line and print the configuration name/directory. + // + if (verb && cfgs.size () > 1) + { + text << (first ? "" : "\n") + << "in configuration " << *c << ':'; + + first = false; + } + if (ps.empty ()) { if (verb) { diag_record dr (info); - dr << "skipping configuration " << *c; - if (c->packages.empty ()) - dr << info << "configuration is empty"; + dr << "no packages "; else - dr << info << "none of specified packages initialized in this " - << "configuration"; + dr << "none of specified packages "; + + dr << "initialized in configuration " << *c << ", skipping"; } continue; } - // If we are printing multiple configurations, separate them with a - // blank line and print the configuration name/directory. - // - if (verb && cfgs.size () > 1) - { - text << (first ? "" : "\n") - << "in configuration " << *c << ':'; - - first = false; - } - transaction t (db.begin ()); // Remove collected packages from the configuration. -- cgit v1.1