From 334ff0a070031eac2e08839aa4c97666941bc653 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 13 Jul 2022 22:13:22 +0300 Subject: Invent reused-only dependency alternative selection mode --- tests/pkg-build.testscript | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript index 0e6eafe..3533b8d 100644 --- a/tests/pkg-build.testscript +++ b/tests/pkg-build.testscript @@ -3991,7 +3991,23 @@ test.options += --no-progress $* box libbox 2>!; - $* box +{ config.box.extras=true } libbox/0.1.0 2>>~%EOE%; + # While at it, test the reused-only alternative selection mode. + # + $* box +{ config.box.extras=true } libbox/0.1.0 2>>EOE != 0; + error: unable to select dependency alternative for package box/1.0.0 + info: explicitly specify dependency packages to manually select the alternative + info: alternative: libbiz + info: unsatisfactory alternative: libbox + error: unable to satisfy constraints on package libbox + info: command line depends on (libbox == 0.1.0) + info: box depends on (libbox >= 0.1.1) + info: available libbox/0.1.0 + info: available libbox/1.0.0 + info: explicitly specify libbox version to manually satisfy both constraints + info: while satisfying box/1.0.0 + EOE + + $* box +{ config.box.extras=true } libbox/0.1.0 ?libbiz 2>>~%EOE%; build plan: new libbiz/1.0.0 (required by box) downgrade libbox/0.1.0 -- cgit v1.1