summaryrefslogtreecommitdiffstats
path: root/t/superuser--split-transactions--strict-require.t
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-08-22 16:24:57 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-08-22 16:24:57 +0000
commit2abcc99cd8dd910a3de4d53195ba238beded9aab (patch)
treeffd099056e718d03c4df13a9b3d8d3a596cd249a /t/superuser--split-transactions--strict-require.t
parent47111fae92cb3ec60572cbd008cae462cf660816 (diff)
downloadurpmi-2abcc99cd8dd910a3de4d53195ba238beded9aab.tar
urpmi-2abcc99cd8dd910a3de4d53195ba238beded9aab.tar.gz
urpmi-2abcc99cd8dd910a3de4d53195ba238beded9aab.tar.bz2
urpmi-2abcc99cd8dd910a3de4d53195ba238beded9aab.tar.xz
urpmi-2abcc99cd8dd910a3de4d53195ba238beded9aab.zip
add a test case for #31969, need to fix urpmi now...
Diffstat (limited to 't/superuser--split-transactions--strict-require.t')
-rw-r--r--t/superuser--split-transactions--strict-require.t33
1 files changed, 33 insertions, 0 deletions
diff --git a/t/superuser--split-transactions--strict-require.t b/t/superuser--split-transactions--strict-require.t
new file mode 100644
index 00000000..e6d60a3d
--- /dev/null
+++ b/t/superuser--split-transactions--strict-require.t
@@ -0,0 +1,33 @@
+#!/usr/bin/perl
+
+# a requires b : bb-1 or b-2
+# bb requires c-1
+# b requires c-2
+# b obsoletes bb
+#
+# upgrading { bb, c-1 } to { b, c-2 } must be done in the same transaction,
+# otherwise { c-1 } to { c-2 } implies removing { a, bb }
+use strict;
+use lib '.', 't';
+use helper;
+use urpm::util;
+use Test::More 'no_plan';
+
+need_root_and_prepare();
+
+my $name = 'split-transactions--strict-require';
+urpmi_addmedia("$name-1 $::pwd/media/$name-1");
+urpmi_addmedia("$name-2 $::pwd/media/$name-2");
+
+test('--split-length 0');
+#test('--split-level 1'); # broken (#31969)
+
+sub test {
+ my ($option) = @_;
+
+ urpmi("--media $name-1 --auto a");
+ check_installed_fullnames('a-1-1', 'bb-1-1', 'c-1-1');
+
+ urpmi("--media $name-2 $option --auto --auto-select");
+ check_installed_fullnames_and_remove('a-1-1', 'b-2-1', 'c-2-1');
+}