From b48bd809a4760bc6e8718adc38837fe62bce1c20 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 23 Aug 2023 20:37:00 +0300 Subject: Fix pkg-build not to issue 'unable to reconfigure dependent' instead of 'unable to up/downgrade package' error message --- tests/pkg-build.testscript | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'tests') diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript index 48a886f..214a50e 100644 --- a/tests/pkg-build.testscript +++ b/tests/pkg-build.testscript @@ -5432,6 +5432,47 @@ test.arguments += --sys-no-query $pkg_drop tpx } + + : fail-change-unsatisfactory-alternative + : + { + $clone_cfg; + + $* tpx ?libfoo 2>!; + + $pkg_status -r >>EOO; + !tpx configured 1.0.0 + libfoo configured 2.0.0 + EOO + + cat cfg/tpx-1.0.0/build/config.build >>~%EOO%; + %.* + config.tpx.libfoo_protocol = 2 + %.* + EOO + + $* tax 2>>EOE != 0; + error: unable to downgrade package libfoo/2.0.0 to 1.0.0 + info: because package tpx depends on (libfoo >= 2.0.0) + info: package libfoo/1.0.0 required by tax + info: explicitly request up/downgrade of package tpx + info: or explicitly specify package libfoo version to manually satisfy these constraints + EOE + + # @@ Note that the above advises doesn't really work here since the + # tpx package is not re-collected recursively. We should probably + # invent the package-specific --rebuild option to re-collect a + # configured package. + # + $* tax tpx ?libfoo/1.0.0 2>>EOE != 0; + error: unable to downgrade package libfoo/2.0.0 to 1.0.0 + info: because package tpx depends on (libfoo >= 2.0.0) + info: explicitly request up/downgrade of package tpx + info: or explicitly specify package libfoo version to manually satisfy these constraints + EOE + + $pkg_drop tpx + } } } -- cgit v1.1