diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2024-06-12 08:49:09 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2024-06-12 08:56:49 +0200 |
commit | 0e961a92b3ce8f962a5b6bddd86c5b59feee589d (patch) | |
tree | f7797d3a4217dd7f8f01ab6f41d0c3bb91fb3791 | |
parent | baa69233273ea8c14a7f683238df6b199f0379b9 (diff) |
Improve deinit diagnostics
-rw-r--r-- | bdep/deinit.cxx | 6 | ||||
-rw-r--r-- | tests/init.testscript | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/bdep/deinit.cxx b/bdep/deinit.cxx index ce1897c..d36f39c 100644 --- a/bdep/deinit.cxx +++ b/bdep/deinit.cxx @@ -114,6 +114,12 @@ namespace bdep else fail << "process " << name_bpkg (o) << " " << e; + // Give the user a hint on what's going on. Failed that, a fetch during + // deinit looks very strange. + // + if (verb) + text << "deinitializing in replacement mode due to existing dependents"; + if (!o.no_fetch ()) cmd_fetch (o, prj, c, true /* fetch_full */); diff --git a/tests/init.testscript b/tests/init.testscript index 6897bc0..6714ea0 100644 --- a/tests/init.testscript +++ b/tests/init.testscript @@ -366,6 +366,7 @@ status += -d prj $deinit -d libprj 2>>/~"%EOE%"; deinitializing in project $~/libprj/ + deinitializing in replacement mode due to existing dependents %fetching dir:.+/libprj% %fetching dir:.+/prj% %fetching git:.+/libprj#.+ \\\(prerequisite of dir:.+/prj\\\)% @@ -444,6 +445,7 @@ status += -d prj deinitializing in project $~/libprj/ deinitializing package libprj deinitializing package libprj-extras + deinitializing in replacement mode due to existing dependents %fetching dir:.+/libprj% %fetching dir:.+/prj% %fetching git:.+/libprj#.+ \\\(prerequisite of dir:.+/prj\\\)% @@ -497,6 +499,7 @@ status += -d prj $deinit -d libprj 2>>/~"%EOE%" != 0; deinitializing in project $~/libprj/ + deinitializing in replacement mode due to existing dependents %fetching dir:.+/libprj% %fetching dir:.+/prj% error: libprj is not available from its dependents' repositories @@ -513,6 +516,7 @@ status += -d prj $deinit -d libprj 2>>/~"%EOE%"; deinitializing in project $~/libprj/ + deinitializing in replacement mode due to existing dependents %fetching dir:.+/libprj% %fetching dir:.+/prj% %fetching git:.+/libprj#.+ \\\(prerequisite of dir:.+/prj\\\)% |