summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2020-09-28 17:34:01 +0300
committerTimo Teräs <timo.teras@iki.fi>2020-09-28 17:38:07 +0300
commitc538509a2a28db0ddac6fe87026da1d02a546343 (patch)
tree6205f3f67694bc94d636381fe1eca97dac371ca4 /test
parentfa63e46a75501153e78e5da0e38770fc6aae7832 (diff)
downloadapk-tools-c538509a2a28db0ddac6fe87026da1d02a546343.tar.gz
apk-tools-c538509a2a28db0ddac6fe87026da1d02a546343.tar.bz2
apk-tools-c538509a2a28db0ddac6fe87026da1d02a546343.tar.xz
apk-tools-c538509a2a28db0ddac6fe87026da1d02a546343.zip
Implement upgrade --prune to remove stale world dependencies
Diffstat (limited to 'test')
-rw-r--r--test/upgrade4.repo26
-rw-r--r--test/upgrade4.test12
2 files changed, 38 insertions, 0 deletions
diff --git a/test/upgrade4.repo b/test/upgrade4.repo
new file mode 100644
index 0000000..cc3a84e
--- /dev/null
+++ b/test/upgrade4.repo
@@ -0,0 +1,26 @@
+C:Q1EyN5AdpAOBJWKMR89pp/C66o+OE=
+P:libold
+V:1
+S:1
+I:1
+
+C:Q1EyN5AdpAOBJWKMR89pp/C66o+FE=
+P:libnew
+V:1
+S:1
+I:1
+D:!libold
+
+C:Q1eVpkasfqZAukAXFYbgwt4xAEEEe=
+P:app
+V:1
+S:1
+I:1
+D:libold
+
+C:Q1EyN5AdpAOBJWKMR89pp/C77FFFF=
+P:app
+V:2
+S:1
+I:1
+D:libnew
diff --git a/test/upgrade4.test b/test/upgrade4.test
new file mode 100644
index 0000000..dcffe28
--- /dev/null
+++ b/test/upgrade4.test
@@ -0,0 +1,12 @@
+@ARGS
+--test-repo upgrade4.repo
+--test-instdb upgrade3.installed
+--test-world "app b"
+--prune
+upgrade
+@EXPECT
+(1/4) Purging b (1)
+(2/4) Purging libold (1)
+(3/4) Installing libnew (1)
+(4/4) Upgrading app (1 -> 2)
+OK: 0 MiB in 3 packages