summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--t/data/SPECS/split-transactions--promote-1/l.spec14
-rw-r--r--t/data/SPECS/split-transactions--promote-1/m.spec14
-rw-r--r--t/data/SPECS/split-transactions--promote-1/n.spec14
-rw-r--r--t/data/SPECS/split-transactions--promote-2/l.spec14
-rw-r--r--t/data/SPECS/split-transactions--promote-2/m.spec13
-rw-r--r--t/superuser--split-transactions--promote.t22
6 files changed, 91 insertions, 0 deletions
diff --git a/t/data/SPECS/split-transactions--promote-1/l.spec b/t/data/SPECS/split-transactions--promote-1/l.spec
new file mode 100644
index 00000000..73ce8e20
--- /dev/null
+++ b/t/data/SPECS/split-transactions--promote-1/l.spec
@@ -0,0 +1,14 @@
+Summary: x
+Name: l
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Requires: k
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--promote-1/m.spec b/t/data/SPECS/split-transactions--promote-1/m.spec
new file mode 100644
index 00000000..d2771e6f
--- /dev/null
+++ b/t/data/SPECS/split-transactions--promote-1/m.spec
@@ -0,0 +1,14 @@
+Summary: x
+Name: m
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Requires: k
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--promote-1/n.spec b/t/data/SPECS/split-transactions--promote-1/n.spec
new file mode 100644
index 00000000..70266840
--- /dev/null
+++ b/t/data/SPECS/split-transactions--promote-1/n.spec
@@ -0,0 +1,14 @@
+Summary: x
+Name: n
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Requires: m
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--promote-2/l.spec b/t/data/SPECS/split-transactions--promote-2/l.spec
new file mode 100644
index 00000000..051e1d6f
--- /dev/null
+++ b/t/data/SPECS/split-transactions--promote-2/l.spec
@@ -0,0 +1,14 @@
+Summary: x
+Name: l
+Version: 2
+Release: 1
+License: x
+Group: x
+Url: x
+Requires: k
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--promote-2/m.spec b/t/data/SPECS/split-transactions--promote-2/m.spec
new file mode 100644
index 00000000..63511663
--- /dev/null
+++ b/t/data/SPECS/split-transactions--promote-2/m.spec
@@ -0,0 +1,13 @@
+Summary: x
+Name: m
+Version: 2
+Release: 1
+License: x
+Group: x
+Url: x
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/superuser--split-transactions--promote.t b/t/superuser--split-transactions--promote.t
index 2fc80958..f5ff2dcd 100644
--- a/t/superuser--split-transactions--promote.t
+++ b/t/superuser--split-transactions--promote.t
@@ -16,6 +16,10 @@
# j2 provides j
# k1-1 provides k, but not k1-2
#
+# l-1 and l-2 requires k
+# m-1 requires k but not m-2
+# n requires m
+#
use strict;
use lib '.', 't';
use helper;
@@ -51,6 +55,11 @@ sub test {
#- below need the promotion of "j2" (replacing removed j1) to work
test_ijk("$split k1");
+
+ #- below tests for bug #52667
+ #- transactions created with only k1 upgrade caused n to be removed
+ #test_klm("$split --auto-select");
+ #test_klm("$split k1");
}
sub test_conflict {
test_conflict_ef();
@@ -107,6 +116,19 @@ sub test_ijk {
check_installed_fullnames_and_remove('i-1-1', 'j2-1-1', 'k1-2-1');
}
+sub test_klm {
+ my ($para) = @_;
+ urpmi("--media $name-1 --auto l");
+ urpmi("--media $name-1 --auto n"); # separated in order to force install order
+ check_installed_names('k1', 'l', 'm', 'n');
+
+ my $output = run_urpm_cmd("urpmi --media $name-2 --auto $para 2>&1");
+ ok($output !~ /transaction is too small/, "test_klm transaction validity");
+ ok($output !~ /due to missing m/, "do not ask for removal of n"); # false message
+ # installation was always ok, just transactions and messages above were wrong
+ check_installed_fullnames_and_remove('k1-2-1', 'm-2-1', 'n-1-1');
+}
+
sub test_conflict_ef {
my ($para) = @_;