]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Add more dup tests
authorMichael Schroeder <mls@suse.de>
Mon, 21 Dec 2015 11:58:39 +0000 (12:58 +0100)
committerMichael Schroeder <mls@suse.de>
Mon, 21 Dec 2015 11:58:39 +0000 (12:58 +0100)
test/testcases/distupgrade/dup_allowuninstall.t [moved from test/testcases/distupgrade/dup_allowuninstall with 100% similarity]
test/testcases/distupgrade/dup_multiversion1.t [moved from test/testcases/distupgrade/dup_multiversion1 with 100% similarity]
test/testcases/distupgrade/dup_multiversion2.t [moved from test/testcases/distupgrade/dup_multiversion2 with 94% similarity]
test/testcases/distupgrade/dup_multiversion3.t [moved from test/testcases/distupgrade/dup_multiversion3 with 100% similarity]
test/testcases/distupgrade/dup_noarchchange.t [moved from test/testcases/distupgrade/dup_noarchchange with 100% similarity]
test/testcases/distupgrade/dup_orphan1.t [new file with mode: 0644]
test/testcases/distupgrade/dup_orphan2.t [new file with mode: 0644]
test/testcases/distupgrade/dup_orphan3.t [new file with mode: 0644]

similarity index 94%
rename from test/testcases/distupgrade/dup_multiversion2
rename to test/testcases/distupgrade/dup_multiversion2.t
index 18909ebbfa0bfd5eb6a2ca7d948d8d4eb9fb0ee9..6708896035fc1de150d5f0b0589be8ba336ffa24 100644 (file)
@@ -89,8 +89,10 @@ job multiversion name a
 job distupgrade all packages
 # a-1-1 is treated as orphaned and stays behind
 result transaction,problems <inline>
-#>erase b-1-1.i686@system
+#>erase a-1-1.i686@system
 #>install a-2-1.i686@available
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+
 
 
 nextjob
@@ -100,7 +102,8 @@ job multiversion name a
 job distupgrade repo available
 # a-1-1 is treated as orphaned and stays behind
 result transaction,problems <inline>
-#>erase b-1-1.i686@system
+#>erase a-1-1.i686@system
 #>install a-2-1.i686@available
+#>upgrade b-1-1.i686@system b-2-1.i686@available
 
 
diff --git a/test/testcases/distupgrade/dup_orphan1.t b/test/testcases/distupgrade/dup_orphan1.t
new file mode 100644 (file)
index 0000000..3c4976a
--- /dev/null
@@ -0,0 +1,78 @@
+# test dup with orphaned packages
+#
+# part 1: simple update
+#
+# dup should leave orphaned a installed
+#
+repo system 0 testtags <inline>
+#>=Pkg: a 1 1 i686
+#>=Pkg: b 1 1 i686
+repo available 0 testtags <inline>
+#>=Pkg: b 2 1 i686
+system i686 * system
+
+job distupgrade all packages
+result transaction,problems <inline>
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+
+nextjob
+
+job distupgrade repo available
+result transaction,problems <inline>
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+
+
+### same with keeporphans
+
+nextjob
+
+solverflags keeporphans
+job distupgrade all packages
+result transaction,problems <inline>
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+
+nextjob
+
+solverflags keeporphans
+job distupgrade repo available
+result transaction,problems <inline>
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+
+
+### same with allowuninstall
+
+nextjob
+
+solverflags allowuninstall
+job distupgrade all packages
+result transaction,problems <inline>
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+
+
+nextjob
+
+solverflags allowuninstall
+job distupgrade repo available
+result transaction,problems <inline>
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+
+
+### same with allowuninstall and keeporphans
+
+nextjob
+
+solverflags allowuninstall keeporphans
+job distupgrade all packages
+result transaction,problems <inline>
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+
+
+nextjob
+
+solverflags allowuninstall keeporphans
+job distupgrade repo available
+result transaction,problems <inline>
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+
+
+
diff --git a/test/testcases/distupgrade/dup_orphan2.t b/test/testcases/distupgrade/dup_orphan2.t
new file mode 100644 (file)
index 0000000..f4e746e
--- /dev/null
@@ -0,0 +1,98 @@
+# test dup with orphaned packages
+#
+# part 2: update conflicts with the orphan
+#
+# dup should leave orphaned a installed
+# for "distupgrade repo available", a is not involved
+# in the dup and thus not considered orphan.
+#
+
+repo system 0 testtags <inline>
+#>=Pkg: a 1 1 i686
+#>=Pkg: b 1 1 i686
+repo available 0 testtags <inline>
+#>=Pkg: b 2 1 i686
+#>=Con: a
+system i686 * system
+
+job distupgrade all packages
+result transaction,problems <inline>
+#>erase a-1-1.i686@system
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+
+nextjob
+
+job distupgrade repo available
+result transaction,problems <inline>
+#>erase a-1-1.i686@system
+#>problem 4d4de423 info package b-2-1.i686 conflicts with a provided by a-1-1.i686
+#>problem 4d4de423 solution 2cf4745c erase a-1-1.i686@system
+#>problem 4d4de423 solution 5a433aff allow b-1-1.i686@system
+#>problem 4d4de423 solution ce4305f2 erase b-1-1.i686@system
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+
+### keeporphans
+
+nextjob
+
+solverflags keeporphans
+job distupgrade all packages
+result transaction,problems <inline>
+#>problem 4d4de423 info package b-2-1.i686 conflicts with a provided by a-1-1.i686
+#>problem 4d4de423 solution 2cf4745c erase a-1-1.i686@system
+#>problem 4d4de423 solution 5a433aff allow b-1-1.i686@system
+#>problem 4d4de423 solution ce4305f2 erase b-1-1.i686@system
+
+nextjob
+
+solverflags keeporphans
+job distupgrade repo available
+result transaction,problems <inline>
+#>erase a-1-1.i686@system
+#>problem 4d4de423 info package b-2-1.i686 conflicts with a provided by a-1-1.i686
+#>problem 4d4de423 solution 2cf4745c erase a-1-1.i686@system
+#>problem 4d4de423 solution 5a433aff allow b-1-1.i686@system
+#>problem 4d4de423 solution ce4305f2 erase b-1-1.i686@system
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+
+
+### same with allowuninstall
+
+nextjob
+
+solverflags allowuninstall
+job distupgrade all packages
+result transaction,problems <inline>
+#>erase a-1-1.i686@system
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+
+
+nextjob
+
+solverflags allowuninstall
+job distupgrade repo available
+result transaction,problems <inline>
+#>erase b-1-1.i686@system
+
+
+### same with allowuninstall and keeporphans
+
+nextjob
+
+solverflags allowuninstall keeporphans
+job distupgrade all packages
+result transaction,problems <inline>
+#>erase a-1-1.i686@system
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+
+
+nextjob
+
+solverflags allowuninstall keeporphans
+job distupgrade repo available
+result transaction,problems <inline>
+#>erase a-1-1.i686@system
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+
+
+
diff --git a/test/testcases/distupgrade/dup_orphan3.t b/test/testcases/distupgrade/dup_orphan3.t
new file mode 100644 (file)
index 0000000..6c04348
--- /dev/null
@@ -0,0 +1,95 @@
+# test dup with orphaned packages
+#
+# part 3: a is not really an orphan, but cannott be downgraded
+#
+
+repo system 0 testtags <inline>
+#>=Pkg: a 1 1 i686
+#>=Pkg: b 1 1 i686
+repo available 0 testtags <inline>
+#>=Pkg: a 1 0 i686
+#>=Pkg: b 2 1 i686
+system i686 * system
+
+solverflags !dupallowdowngrade
+job distupgrade all packages
+result transaction,problems <inline>
+#>downgrade a-1-1.i686@system a-1-0.i686@available
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+#>problem c43b1300 info problem with installed package a-1-1.i686
+#>problem c43b1300 solution c43b1300 replace a-1-1.i686@system a-1-0.i686@available
+
+nextjob
+
+solverflags !dupallowdowngrade
+job distupgrade repo available
+result transaction,problems <inline>
+#>downgrade a-1-1.i686@system a-1-0.i686@available
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+#>problem c43b1300 info problem with installed package a-1-1.i686
+#>problem c43b1300 solution c43b1300 replace a-1-1.i686@system a-1-0.i686@available
+
+### keeporphans
+
+nextjob
+
+solverflags !dupallowdowngrade keeporphans
+job distupgrade all packages
+result transaction,problems <inline>
+#>downgrade a-1-1.i686@system a-1-0.i686@available
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+#>problem c43b1300 info problem with installed package a-1-1.i686
+#>problem c43b1300 solution c43b1300 replace a-1-1.i686@system a-1-0.i686@available
+
+nextjob
+
+solverflags !dupallowdowngrade keeporphans
+job distupgrade repo available
+result transaction,problems <inline>
+#>downgrade a-1-1.i686@system a-1-0.i686@available
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+#>problem c43b1300 info problem with installed package a-1-1.i686
+#>problem c43b1300 solution c43b1300 replace a-1-1.i686@system a-1-0.i686@available
+
+
+### same with allowuninstall
+
+nextjob
+
+solverflags !dupallowdowngrade allowuninstall
+job distupgrade all packages
+result transaction,problems <inline>
+#>downgrade a-1-1.i686@system a-1-0.i686@available
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+
+
+nextjob
+
+solverflags !dupallowdowngrade allowuninstall
+job distupgrade repo available
+result transaction,problems <inline>
+#>downgrade a-1-1.i686@system a-1-0.i686@available
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+
+
+### same with allowuninstall and keeporphans
+
+nextjob
+
+solverflags !dupallowdowngrade allowuninstall keeporphans
+job distupgrade all packages
+result transaction,problems <inline>
+#>downgrade a-1-1.i686@system a-1-0.i686@available
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+
+
+nextjob
+
+solverflags !dupallowdowngrade allowuninstall keeporphans
+job distupgrade repo available
+result transaction,problems <inline>
+#>downgrade a-1-1.i686@system a-1-0.i686@available
+#>upgrade b-1-1.i686@system b-2-1.i686@available
+
+
+