aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-10-06 16:30:09 +0300
committerTimo Teräs <timo.teras@iki.fi>2014-10-06 16:30:09 +0300
commite0f9b0897be8e5524eaeef302249c90498d3218a (patch)
treef03e9a8cc201c267ffa2152a78b71638438b84c9 /test
parentf2d9a1440546da4fc9302a93370039b3a12c77ce (diff)
solver: enforce conflicts during upgrades and new pkg installs
This makes sure any conflicted packages will be removed first. Useful if we know there are conflicting files, and want to avoid adding potentially harmful replaces line. Add a test case for this too.
Diffstat (limited to 'test')
-rw-r--r--test/upgrade.installed13
-rw-r--r--test/upgrade.repo27
-rw-r--r--test/upgrade1.test10
3 files changed, 50 insertions, 0 deletions
diff --git a/test/upgrade.installed b/test/upgrade.installed
new file mode 100644
index 0000000..544ffae
--- /dev/null
+++ b/test/upgrade.installed
@@ -0,0 +1,13 @@
+C:Q1EyN5AdpAOBJWKMR89pp/C66o+OE=
+P:libold
+V:1
+S:1
+I:1
+
+C:Q1eVpkasfqZAukAXFYbgwt4xAEEEe=
+P:app
+V:1
+S:1
+I:1
+D:libold
+
diff --git a/test/upgrade.repo b/test/upgrade.repo
new file mode 100644
index 0000000..032a29b
--- /dev/null
+++ b/test/upgrade.repo
@@ -0,0 +1,27 @@
+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/upgrade1.test b/test/upgrade1.test
new file mode 100644
index 0000000..f437590
--- /dev/null
+++ b/test/upgrade1.test
@@ -0,0 +1,10 @@
+@ARGS
+--test-repo upgrade.repo
+--test-instdb upgrade.installed
+--test-world app
+upgrade
+@EXPECT
+(1/3) Purging libold (1)
+(2/3) Installing libnew (1)
+(3/3) Upgrading app (1 -> 2)
+OK: 0 MiB in 2 packages