aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-02-13 16:30:31 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-02-13 16:30:31 +0200
commit74bcab9dfa50647dd6615f261f2c2bc9f5a38951 (patch)
tree3cd60a784ff8a16b58ddd2ec4bb12003e9d11719 /tests
parent4fd0df2573341824eea5edfaf45be33997ce56ce (diff)
Offer in pkg-build to drop prerequisite packages that are no longer necessary
This can happen if a package that is being upgraded/downgraded changes its dependencies.
Diffstat (limited to 'tests')
-rw-r--r--tests/repository/1/satisfy/libbar-1.2.0.tar.gzbin0 -> 348 bytes
l---------tests/repository/1/satisfy/t5/libbar-1.2.0.tar.gz1
l---------tests/repository/1/satisfy/t5/repositories1
-rwxr-xr-xtests/test.sh28
4 files changed, 30 insertions, 0 deletions
diff --git a/tests/repository/1/satisfy/libbar-1.2.0.tar.gz b/tests/repository/1/satisfy/libbar-1.2.0.tar.gz
new file mode 100644
index 0000000..4572395
--- /dev/null
+++ b/tests/repository/1/satisfy/libbar-1.2.0.tar.gz
Binary files differ
diff --git a/tests/repository/1/satisfy/t5/libbar-1.2.0.tar.gz b/tests/repository/1/satisfy/t5/libbar-1.2.0.tar.gz
new file mode 120000
index 0000000..b4a7773
--- /dev/null
+++ b/tests/repository/1/satisfy/t5/libbar-1.2.0.tar.gz
@@ -0,0 +1 @@
+../libbar-1.2.0.tar.gz \ No newline at end of file
diff --git a/tests/repository/1/satisfy/t5/repositories b/tests/repository/1/satisfy/t5/repositories
new file mode 120000
index 0000000..d965b15
--- /dev/null
+++ b/tests/repository/1/satisfy/t5/repositories
@@ -0,0 +1 @@
+../repositories \ No newline at end of file
diff --git a/tests/test.sh b/tests/test.sh
index 2dcd6f7..e4d962b 100755
--- a/tests/test.sh
+++ b/tests/test.sh
@@ -1204,6 +1204,34 @@ test cfg-fetch
test pkg-build -y libbaz
stat libfoo "configured 1.1.0"
+# drop prerequisites on downgrade
+#
+test rep-create repository/1/satisfy/t5
+test cfg-create --wipe
+test cfg-add $rep/satisfy/t2
+test cfg-fetch
+
+test pkg-build -y libbar
+stat libfoo "configured 1.0.0"
+stat libbar "configured 1.0.0 hold_package"
+
+test cfg-add $rep/satisfy/t5
+test cfg-fetch
+
+test pkg-build -y libbar
+stat libfoo "available 1.0.0"
+stat libbar "configured 1.2.0 hold_package"
+
+#@@test pkg-build -y libbar/1.0.0 libfoo
+test pkg-build -y libbar/1.0.0
+test pkg-build -y libfoo
+stat libfoo "configured 1.0.0 hold_package"
+stat libbar "configured 1.0.0 hold_package hold_version; available 1.2.0"
+
+test pkg-build -y libbar
+stat libfoo "configured 1.0.0 hold_package"
+#@@stat libbar "configured 1.2.0 hold_package"
+stat libbar "configured 1.2.0 hold_package hold_version"
##
## pkg-drop