diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-09-05 15:49:38 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-09-05 15:49:38 +0000 |
commit | 58c9411b535302166226b8700c21fd740d44befb (patch) | |
tree | 9418e249384fedac7b1da019d78371f9e90eb02f /t/superuser--split-transactions--strict-require-and-obsolete.t | |
parent | 5b73a4b1cb00d2c178d0c00a358a0cf81533b056 (diff) | |
download | urpmi-58c9411b535302166226b8700c21fd740d44befb.tar urpmi-58c9411b535302166226b8700c21fd740d44befb.tar.gz urpmi-58c9411b535302166226b8700c21fd740d44befb.tar.bz2 urpmi-58c9411b535302166226b8700c21fd740d44befb.tar.xz urpmi-58c9411b535302166226b8700c21fd740d44befb.zip |
add a simple test that shows urpmi promotes pkgs when a strict require fails
Diffstat (limited to 't/superuser--split-transactions--strict-require-and-obsolete.t')
-rw-r--r-- | t/superuser--split-transactions--strict-require-and-obsolete.t | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/t/superuser--split-transactions--strict-require-and-obsolete.t b/t/superuser--split-transactions--strict-require-and-obsolete.t new file mode 100644 index 00000000..6ad4aec9 --- /dev/null +++ b/t/superuser--split-transactions--strict-require-and-obsolete.t @@ -0,0 +1,33 @@ +#!/usr/bin/perl + +# a requires b : bb or b +# 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-and-obsolete'; +urpmi_addmedia("$name-1 $::pwd/media/$name-1"); +urpmi_addmedia("$name-2 $::pwd/media/$name-2"); + +test('--split-length 0'); +test('--split-level 1'); # was 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'); +} |