summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2009-03-20 18:32:07 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2009-03-20 18:32:07 +0000
commit3f308b8ee074d04033406dfab634703ab464ba04 (patch)
tree07b45a10c2c5c1aecfedab703f916ffc15ee1b49
parentc4c74f75eb386504370ffdca8e2f119a55ada108 (diff)
downloadurpmi-3f308b8ee074d04033406dfab634703ab464ba04.tar
urpmi-3f308b8ee074d04033406dfab634703ab464ba04.tar.gz
urpmi-3f308b8ee074d04033406dfab634703ab464ba04.tar.bz2
urpmi-3f308b8ee074d04033406dfab634703ab464ba04.tar.xz
urpmi-3f308b8ee074d04033406dfab634703ab464ba04.zip
Test case from Anssi Hannula for bug #47803
-rw-r--r--t/data/SPECS/split-transactions--promote-1/i.spec28
-rw-r--r--t/data/SPECS/split-transactions--promote-1/j1.spec30
-rw-r--r--t/data/SPECS/split-transactions--promote-1/k1.spec28
-rw-r--r--t/data/SPECS/split-transactions--promote-2/j2.spec28
-rw-r--r--t/data/SPECS/split-transactions--promote-2/k1.spec26
-rw-r--r--t/superuser--split-transactions--promote.t18
-rw-r--r--t/superuser--split-transactions--strict-require.t2
7 files changed, 159 insertions, 1 deletions
diff --git a/t/data/SPECS/split-transactions--promote-1/i.spec b/t/data/SPECS/split-transactions--promote-1/i.spec
new file mode 100644
index 00000000..b43bb542
--- /dev/null
+++ b/t/data/SPECS/split-transactions--promote-1/i.spec
@@ -0,0 +1,28 @@
+Summary: x
+Name: i
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Requires: j
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
+Summary: x
+Name: i
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Requires: j
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--promote-1/j1.spec b/t/data/SPECS/split-transactions--promote-1/j1.spec
new file mode 100644
index 00000000..6d2d34b1
--- /dev/null
+++ b/t/data/SPECS/split-transactions--promote-1/j1.spec
@@ -0,0 +1,30 @@
+Summary: x
+Name: j1
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Provides: j
+Requires: k
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
+Summary: x
+Name: j1
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Provides: j
+Requires: k
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--promote-1/k1.spec b/t/data/SPECS/split-transactions--promote-1/k1.spec
new file mode 100644
index 00000000..777c4b33
--- /dev/null
+++ b/t/data/SPECS/split-transactions--promote-1/k1.spec
@@ -0,0 +1,28 @@
+Summary: x
+Name: k1
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Provides: k
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
+Summary: x
+Name: k1
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Provides: k
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--promote-2/j2.spec b/t/data/SPECS/split-transactions--promote-2/j2.spec
new file mode 100644
index 00000000..73606ed8
--- /dev/null
+++ b/t/data/SPECS/split-transactions--promote-2/j2.spec
@@ -0,0 +1,28 @@
+Summary: x
+Name: j2
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Provides: j
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
+Summary: x
+Name: j2
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Provides: j
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--promote-2/k1.spec b/t/data/SPECS/split-transactions--promote-2/k1.spec
new file mode 100644
index 00000000..8b1309db
--- /dev/null
+++ b/t/data/SPECS/split-transactions--promote-2/k1.spec
@@ -0,0 +1,26 @@
+Summary: x
+Name: k1
+Version: 2
+Release: 1
+License: x
+Group: x
+Url: x
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
+Summary: x
+Name: k1
+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 69b8e208..112afe95 100644
--- a/t/superuser--split-transactions--promote.t
+++ b/t/superuser--split-transactions--promote.t
@@ -11,6 +11,11 @@
#
# h-1 conflicts with g-2
#
+# i requires j
+# j1 provides j and requires k
+# j2 provides j
+# k1-1 provides k, but not k1-2
+#
use strict;
use lib '.', 't';
use helper;
@@ -43,6 +48,9 @@ sub test {
#- below need the promotion of "h-2" (upgraded from "h-1") to work
test_gh("$split g");
+
+ #- below need the promotion of "j2" (replacing removed j1) to work
+ test_ijk("$split k1");
}
sub test_conflict {
test_conflict_ef();
@@ -89,6 +97,16 @@ sub test_gh {
check_installed_fullnames_and_remove('g-2-1', 'h-2-1');
}
+sub test_ijk {
+ my ($para) = @_;
+
+ urpmi("--media $name-1 --auto i");
+ check_installed_names('i', 'j1', 'k1');
+
+ urpmi("--media $name-2 --auto $para");
+ check_installed_fullnames_and_remove('i-1-1', 'j2-1-1', 'k1-2-1');
+}
+
sub test_conflict_ef {
my ($para) = @_;
diff --git a/t/superuser--split-transactions--strict-require.t b/t/superuser--split-transactions--strict-require.t
index 60766e8e..086cde81 100644
--- a/t/superuser--split-transactions--strict-require.t
+++ b/t/superuser--split-transactions--strict-require.t
@@ -54,7 +54,7 @@ sub test_c {
check_installed_fullnames('a-1-1', 'b-1-1', 'c-1-1');
urpmi("--media $name-2 --auto $option c");
- check_installed_fullnames_and_remove('c-2-1'); # WARNING: a-2 could be promoted
+ check_installed_fullnames_and_remove('a-2-1', 'c-2-1');
}
sub test_d {