diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-08-23 20:37:00 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2023-09-25 11:35:25 +0300 |
commit | b48bd809a4760bc6e8718adc38837fe62bce1c20 (patch) | |
tree | 8830d33b211191f6f080d758802450479746758d /tests/pkg-build.testscript | |
parent | 668ffb5d3258945e35f8f6e62d0395aacc219e23 (diff) |
Fix pkg-build not to issue 'unable to reconfigure dependent' instead of 'unable to up/downgrade package' error message
Diffstat (limited to 'tests/pkg-build.testscript')
-rw-r--r-- | tests/pkg-build.testscript | 41 |
1 files changed, 41 insertions, 0 deletions
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 + } } } |