aboutsummaryrefslogtreecommitdiff
path: root/tests/pkg-build.testscript
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-04-29 12:10:57 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-05-06 12:57:16 +0300
commiteb4e71d7c0cee611aafb2dfef90ebd500c5f5951 (patch)
treee68a8eed93a49af951ce2dfc4bf5504314175453 /tests/pkg-build.testscript
parent048f46d03d31bf5e52e67ab65c44f34e51875782 (diff)
Fix collect_order_dependents() not to verify constraints of being dropped dependent
Diffstat (limited to 'tests/pkg-build.testscript')
-rw-r--r--tests/pkg-build.testscript77
1 files changed, 77 insertions, 0 deletions
diff --git a/tests/pkg-build.testscript b/tests/pkg-build.testscript
index 79cce38..1aa3a95 100644
--- a/tests/pkg-build.testscript
+++ b/tests/pkg-build.testscript
@@ -227,8 +227,11 @@
# |-- t12b -> t12b (prerequisite repository)
# | |-- libbaz-0.1.0.tar.gz
# | |-- libbar-1.0.0.tar.gz -> libbaz == 0.1.0
+# | |-- foo-0.1.0.tar.gz
# | |-- foo-1.0.0.tar.gz -> libbar
# | |-- bar-1.0.0.tar.gz -> libbar == 0.1.0
+# | |-- baz-0.1.0.tar.gz -> libbaz
+# | |-- baz-1.0.0.tar.gz -> libbaz == 1.0.0
# | `-- repositories.manifest
# |
# `-- git
@@ -4630,6 +4633,80 @@ test.options += --no-progress
}
}
+ : drop-dependent
+ :
+ {
+ +$clone_root_cfg && $rep_add $rep/t12b && $rep_fetch
+
+ test.arguments += --yes
+
+ : unhold
+ :
+ : Test that the being dropped dependent does not constrain a dependency
+ : anymore.
+ :
+ {
+ $clone_cfg;
+
+ $* libbar 2>!;
+
+ $pkg_status -r >>EOO;
+ !libbar configured 1.0.0
+ libbaz configured 0.1.0 available [1.0.0]
+ EOO
+
+ $* baz/0.1.0 ?libbar ?libbaz 2>!;
+
+ $pkg_status -r >>EOO;
+ !baz configured !0.1.0 available 1.0.0
+ libbaz configured 1.0.0
+ EOO
+
+ $pkg_drop baz
+ }
+
+ : unuse
+ :
+ : Unlike the previous test, at the time we check the constraint applied
+ : by libbar on libbaz (== 0.1.0) there is no evidence that libbar will be
+ : dropped, which will happen some later execution plan refinement
+ : iteration.
+ :
+ : @@ This scenario is not supported yet and fails with:
+ :
+ : error: unable to upgrade package libbaz/0.1.0 to 1.0.0
+ : info: because package libbar depends on (libbaz == 0.1.0)
+ : info: package libbaz/1.0.0 required by baz
+ : info: explicitly request up/downgrade of package libbar
+ : info: or explicitly specify package libbaz version to manually satisfy these constraints
+ :
+ : We could probably fix this postponing the constraints check in
+ : collect_order_dependents() until the final execution plan is produced
+ : (after all that refinement iterations). We could have an additional
+ : iteration after all the refinements which would enable the constraint
+ : check in collect_order_dependents().
+ :
+ if false
+ {
+ $clone_cfg;
+
+ $* foo 2>!;
+
+ $pkg_status -r >>EOO;
+ !foo configured 1.0.0
+ libbar configured 1.0.0
+ libbaz configured 0.1.0 available [1.0.0]
+ EOO
+
+ $* baz foo/0.1.0 2>|;
+
+ $pkg_status -r >>EOO;
+ EOO
+
+ $pkg_drop foo
+ }
+ }
+
: configuration-negotiation
:
{