summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-01-18 10:16:53 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-01-18 10:16:53 +0000
commitd9a2def57e458f1cbc7487a10b5687f21e86fa23 (patch)
tree832a50fb342ddf53ff48e78ed0b5bfae5a7a3a60 /t
parentb62286596d011f4b4dc0352b950ac76c3cd93f8a (diff)
downloadurpmi-d9a2def57e458f1cbc7487a10b5687f21e86fa23.tar
urpmi-d9a2def57e458f1cbc7487a10b5687f21e86fa23.tar.gz
urpmi-d9a2def57e458f1cbc7487a10b5687f21e86fa23.tar.bz2
urpmi-d9a2def57e458f1cbc7487a10b5687f21e86fa23.tar.xz
urpmi-d9a2def57e458f1cbc7487a10b5687f21e86fa23.zip
add a failing test case
Diffstat (limited to 't')
-rw-r--r--t/data/SPECS/split-transactions--strict-require-1/d.spec14
-rw-r--r--t/data/SPECS/split-transactions--strict-require-1/dd.spec13
-rw-r--r--t/data/SPECS/split-transactions--strict-require-2/d.spec14
-rw-r--r--t/data/SPECS/split-transactions--strict-require-2/dd.spec13
-rw-r--r--t/superuser--split-transactions--strict-require.t19
5 files changed, 73 insertions, 0 deletions
diff --git a/t/data/SPECS/split-transactions--strict-require-1/d.spec b/t/data/SPECS/split-transactions--strict-require-1/d.spec
new file mode 100644
index 00000000..6badceb2
--- /dev/null
+++ b/t/data/SPECS/split-transactions--strict-require-1/d.spec
@@ -0,0 +1,14 @@
+Summary: x
+Name: d
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+Requires: dd = %version
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--strict-require-1/dd.spec b/t/data/SPECS/split-transactions--strict-require-1/dd.spec
new file mode 100644
index 00000000..c89f2aeb
--- /dev/null
+++ b/t/data/SPECS/split-transactions--strict-require-1/dd.spec
@@ -0,0 +1,13 @@
+Summary: x
+Name: dd
+Version: 1
+Release: 1
+License: x
+Group: x
+Url: x
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--strict-require-2/d.spec b/t/data/SPECS/split-transactions--strict-require-2/d.spec
new file mode 100644
index 00000000..e830942e
--- /dev/null
+++ b/t/data/SPECS/split-transactions--strict-require-2/d.spec
@@ -0,0 +1,14 @@
+Summary: x
+Name: d
+Version: 2
+Release: 1
+License: x
+Group: x
+Url: x
+Requires: dd = %version
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/data/SPECS/split-transactions--strict-require-2/dd.spec b/t/data/SPECS/split-transactions--strict-require-2/dd.spec
new file mode 100644
index 00000000..3f7e55e9
--- /dev/null
+++ b/t/data/SPECS/split-transactions--strict-require-2/dd.spec
@@ -0,0 +1,13 @@
+Summary: x
+Name: dd
+Version: 2
+Release: 1
+License: x
+Group: x
+Url: x
+BuildRoot: %{_tmppath}/%{name}
+
+%description
+x
+
+%files
diff --git a/t/superuser--split-transactions--strict-require.t b/t/superuser--split-transactions--strict-require.t
index 7ccfeff3..f8f5bd38 100644
--- a/t/superuser--split-transactions--strict-require.t
+++ b/t/superuser--split-transactions--strict-require.t
@@ -4,6 +4,9 @@
# b-1 requires c-1
# a-2 requires c-2, no b-2
#
+# d-1 requires dd-1
+# d-2 requires dd-2
+#
use strict;
use lib '.', 't';
use helper;
@@ -21,6 +24,10 @@ test('--split-level 1'); # ERROR: should not use a big transaction
test_c('--split-level 1');
+# test_d();
+# ERROR: urpmi goes crazy, saying:
+# The following package has to be removed for others to be upgraded: d-2-1 (in order to install d-2-1)
+
sub test {
my ($option) = @_;
@@ -40,3 +47,15 @@ sub test_c {
urpmi("--media $name-2 --auto $option c");
check_installed_fullnames_and_remove('c-2-1'); # WARNING: a-2 could be promoted
}
+
+sub test_d {
+ urpmi("--media $name-1 --auto d");
+
+ # here d-2 is installed without its requirement dd-2
+ system_("rpm --root $::pwd/root -i media/$name-2/d-2-*.rpm --nodeps");
+ # we now have both d-1 and d-2 installed, which urpmi doesn't like much
+ check_installed_fullnames('d-1-1', 'dd-1-1', 'd-2-1');
+
+ urpmi("--media $name-2 --auto-select --auto");
+ check_installed_fullnames_and_remove('d-2-1', 'dd-2-1');
+}