]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Add more choicerules tests
authorMichael Schroeder <mls@suse.de>
Wed, 16 Mar 2022 14:16:42 +0000 (15:16 +0100)
committerMichael Schroeder <mls@suse.de>
Wed, 16 Mar 2022 14:16:42 +0000 (15:16 +0100)
test/testcases/choicerules/choice1.t [new file with mode: 0644]
test/testcases/choicerules/choice1b.t [new file with mode: 0644]
test/testcases/choicerules/choice2.t
test/testcases/choicerules/choice2b.t [new file with mode: 0644]
test/testcases/choicerules/choice3.t
test/testcases/choicerules/choice3b.t [new file with mode: 0644]
test/testcases/choicerules/choice4.t
test/testcases/choicerules/choice5.t [new file with mode: 0644]
test/testcases/choicerules/choice6.t [new file with mode: 0644]

diff --git a/test/testcases/choicerules/choice1.t b/test/testcases/choicerules/choice1.t
new file mode 100644 (file)
index 0000000..fbd5184
--- /dev/null
@@ -0,0 +1,27 @@
+#
+#Rule #2:
+#    !A-2-1.noarch [3] (w1)
+#    B-2-1.noarch [4] (w2)
+#    C-2-1.noarch [5]
+#
+# ==> Choice Rule
+#    !A-2-1.noarch [3] (w1)
+#    B-2-1.noarch [4] (w2)
+#
+repo system 0 testtags <inline>
+#>=Pkg: B 1 1 noarch
+#>=Prv: P = 1
+repo available 0 testtags <inline>
+#>=Pkg: A 2 1 noarch
+#>=Req: P = 2
+#>=Pkg: B 2 1 noarch
+#>=Prv: P = 2
+#>=Pkg: C 2 1 noarch
+#>=Prv: P = 2
+system i686 rpm system
+
+job install name A
+result transaction,problems <inline>
+result transaction,problems <inline>
+#>install A-2-1.noarch@available
+#>upgrade B-1-1.noarch@system B-2-1.noarch@available
diff --git a/test/testcases/choicerules/choice1b.t b/test/testcases/choicerules/choice1b.t
new file mode 100644 (file)
index 0000000..fc47b72
--- /dev/null
@@ -0,0 +1,18 @@
+repo system 0 testtags <inline>
+#>=Pkg: B 1 1 noarch
+#>=Prv: P = 1
+repo available 0 testtags <inline>
+#>=Pkg: X 1 1 noarch
+#>=Pkg: Y 1 1 noarch
+#>=Pkg: A 2 1 noarch
+#>=Req: P = 2 <IF> (X & Y)
+#>=Pkg: B 2 1 noarch
+#>=Prv: P = 2
+#>=Pkg: C 2 1 noarch
+#>=Prv: P = 2
+system i686 rpm system
+
+job install name A
+result transaction,problems <inline>
+result transaction,problems <inline>
+#>install A-2-1.noarch@available
index cb067b188dfdd1a0b454f0ccd7dfdf4873e718f2..1eb6c7c3c33bd538fe496fcdd88899012ca3a755 100644 (file)
@@ -1,3 +1,24 @@
+#
+# Test that updating package B will update package A
+# instead of pulling in new package C
+#
+#Rule #5:
+#    !A-2-2.noarch [5] (w1)
+#    B-2-1.noarch [6] (w2)
+#    C-2-1.noarch [8]
+#Rule #7:
+#    !A-2-1.noarch [4] (w1)
+#    B-2-1.noarch [6] (w2)
+#    C-2-1.noarch [8]
+#Rule #8:
+#    !A-1-1.noarch [2]I (w1)
+#    B-1-1.noarch [3]I (w2)
+#    C-1-1.noarch [7]
+#
+# ==> Choice Rule for #8:
+#    !A-1-1.noarch [2]I (w1)
+#    B-1-1.noarch [3]I (w2)
+#
 repo system 0 testtags <inline>
 #>=Pkg: A 1 1 noarch
 #>=Req: P = 1
diff --git a/test/testcases/choicerules/choice2b.t b/test/testcases/choicerules/choice2b.t
new file mode 100644 (file)
index 0000000..ae619f7
--- /dev/null
@@ -0,0 +1,47 @@
+#
+# Test that updating package B will update package A
+# instead of pulling in new package C
+#
+#Rule #5:
+#    !A-2-2.noarch [5] (w1)
+#    B-2-1.noarch [6] (w2)
+#    C-2-1.noarch [8]
+#Rule #7:
+#    !A-2-1.noarch [4] (w1)
+#    B-2-1.noarch [6] (w2)
+#    C-2-1.noarch [8]
+#Rule #8:
+#    !A-1-1.noarch [2]I (w1)
+#    B-1-1.noarch [3]I (w2)
+#    C-1-1.noarch [7]
+#
+# ==> Choice Rule for #8:
+#    !A-1-1.noarch [2]I (w1)
+#    B-1-1.noarch [3]I (w2)
+#
+repo system 0 testtags <inline>
+#>=Pkg: A 1 1 noarch
+#>=Req: P = 1
+#>=Pkg: B 1 1 noarch
+#>=Prv: P = 1
+repo available 0 testtags <inline>
+#>=Pkg: A 1 1 noarch
+#>=Req: P = 1
+#>=Pkg: B 1 1 noarch
+#>=Prv: P = 1
+#>=Pkg: A 2 1 noarch
+#>=Req: P = 2
+#>=Pkg: A 2 2 noarch
+#>=Req: P = 2
+#>=Pkg: B 2 1 noarch
+#>=Prv: P = 2
+#>=Pkg: C 1 1 noarch
+#>=Prv: P = 1
+#>=Pkg: C 2 1 noarch
+#>=Prv: P = 2
+system i686 rpm system
+
+job update name B
+result transaction,problems <inline>
+#>upgrade A-1-1.noarch@system A-2-2.noarch@available
+#>upgrade B-1-1.noarch@system B-2-1.noarch@available
index d5d41acc20b0d57d38cae904219c7908f909fdd9..1b82e69151e580f2f7fb3028a022b38b2e01ed6c 100644 (file)
@@ -1,3 +1,19 @@
+# Do not block an update because of a choice rule
+#
+#Rule #3:
+#    !B-1-1.noarch [4] (w1)
+#    A-1-1.noarch [2]I (w2)
+#    Anew-2-1.noarch [6]
+#Rule #4:
+#    !B-1-1.noarch [3]I (w1)
+#    A-1-1.noarch [2]I (w2)
+#    Anew-2-1.noarch [6]
+#
+# ==> No choice rule for Rule#4!
+# ==> Choice Rule for #3:
+#    !B-1-1.noarch [4] (w1)
+#    A-1-1.noarch [2]I (w2)
+#
 repo system 0 testtags <inline>
 #>=Pkg: A 1 1 noarch
 #>=Prv: libA
diff --git a/test/testcases/choicerules/choice3b.t b/test/testcases/choicerules/choice3b.t
new file mode 100644 (file)
index 0000000..fb9c725
--- /dev/null
@@ -0,0 +1,31 @@
+# Do not block an update because of a choice rule
+#
+#Rule #3:
+#    !B-1-1.noarch [4] (w1)
+#    A-1-1.noarch [2]I (w2)
+#    Anew-2-1.noarch [6]
+#Rule #4:
+#    !B-1-1.noarch [3]I (w1)
+#    A-1-1.noarch [2]I (w2)
+#    Anew-2-1.noarch [6]
+#
+# ==> No choice rule for Rule#4!
+# ==> Choice Rule for #3:
+#    !B-1-1.noarch [4] (w1)
+#    A-1-1.noarch [2]I (w2)
+#
+repo system 0 testtags <inline>
+#>=Pkg: A 1 1 noarch
+#>=Prv: libA
+#>=Pkg: B 1 1 noarch
+#>=Req: libA
+repo available 0 testtags <inline>
+#>=Pkg: A 2 1 noarch
+#>=Pkg: Anew 2 1 noarch
+#>=Prv: libA
+system i686 rpm system
+
+job update all packages
+result transaction,problems <inline>
+#>install Anew-2-1.noarch@available
+#>upgrade A-1-1.noarch@system A-2-1.noarch@available
index 1bf9f4870670a0dffc96d798d4ca63d17efc0574..7378a569a3a15947b6ea70319470d506786ba117 100644 (file)
@@ -1,3 +1,21 @@
+# This tests that A is updated instead of Anew being installed
+#
+#Rule #4:
+#    !B-2-2.noarch [11] (w1)
+#    A-2-2.noarch [9] (w2)
+#    Anew-2-2.noarch [10]
+#Rule #11:
+#    !B-2-1.noarch [8] (w1)
+#    A-2-1.noarch [6] (w2)
+#    Anew-2-1.noarch [7]
+#
+#Choice Rule for #4:
+#    !B-2-2.noarch [11] (w1)
+#    A-2-2.noarch [9] (w2)
+#Choice Rule for #11
+#    !B-2-1.noarch [8] (w1)
+#    A-2-1.noarch [6] (w2)
+#
 repo system 0 testtags <inline>
 #>=Pkg: A 1 1 noarch
 #>=Prv: libA = 1-1
diff --git a/test/testcases/choicerules/choice5.t b/test/testcases/choicerules/choice5.t
new file mode 100644 (file)
index 0000000..9f43c8a
--- /dev/null
@@ -0,0 +1,21 @@
+#
+# test that a package split does not update unrelated packages
+#
+repo system 0 testtags <inline>
+#>=Pkg: A 1 1 noarch
+#>=Prv: libA
+#>=Pkg: B 1 1 noarch
+#>=Req: libA
+repo available 0 testtags <inline>
+#>=Pkg: A 1 1 noarch
+#>=Prv: libA
+#>=Pkg: A 2 1 noarch
+#>=Pkg: Asplit 2 1 noarch
+#>=Prv: libA
+#>=Pkg: B 2 1 noarch
+#>=Req: libA
+system i686 rpm system
+job update name A
+result transaction,problems <inline>
+#>install Asplit-2-1.noarch@available
+#>upgrade A-1-1.noarch@system A-2-1.noarch@available
diff --git a/test/testcases/choicerules/choice6.t b/test/testcases/choicerules/choice6.t
new file mode 100644 (file)
index 0000000..e860ae2
--- /dev/null
@@ -0,0 +1,28 @@
+#Rule #4:
+#    !php-fpm-7.2.24-1.noarch [5] (w1)
+#    glibc-2.17-325.noarch [2]I (w2)
+#    libcrypt-4.1.1-6.noarch [7]
+#=> no choice rule for #4
+#
+repo @System 0 testtags <inline>
+#>=Pkg: glibc 2.17 325 noarch
+#>=Prv: libcrypt
+#>=Pkg: php 5.4.16 48 noarch
+repo available 0 testtags <inline>
+#>=Pkg: php 7.2.24 1 noarch
+#>=Rec: php-fpm = 7.2.24-1
+#>=Pkg: php-fpm 7.2.24 1 noarch
+#>=Req: libcrypt
+#>=Pkg: php-fpm 8.0.13 2 noarch
+#>=Req: libcrypt
+#>=Pkg: libcrypt 4.1.1 6 noarch
+#>=Req: libc
+#>=Pkg: glibc 2.28 181 noarch
+#>=Prv: libc
+system i686 rpm @System
+job update all packages
+result transaction,problems <inline>
+#>install libcrypt-4.1.1-6.noarch@available
+#>install php-fpm-7.2.24-1.noarch@available
+#>upgrade glibc-2.17-325.noarch@@System glibc-2.28-181.noarch@available
+#>upgrade php-5.4.16-48.noarch@@System php-7.2.24-1.noarch@available