diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-09-13 10:34:12 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-09-13 10:34:12 +0000 |
commit | cd383c6e9021689675d2e05f5d8e3fcbbbad1669 (patch) | |
tree | 4de4f18a3866888a6523c2eefbedbcc1df471b4f /t | |
parent | a875cfd4bba2c24d68cb37bd7fbdbd8ca7a7157b (diff) | |
download | urpmi-cd383c6e9021689675d2e05f5d8e3fcbbbad1669.tar urpmi-cd383c6e9021689675d2e05f5d8e3fcbbbad1669.tar.gz urpmi-cd383c6e9021689675d2e05f5d8e3fcbbbad1669.tar.bz2 urpmi-cd383c6e9021689675d2e05f5d8e3fcbbbad1669.tar.xz urpmi-cd383c6e9021689675d2e05f5d8e3fcbbbad1669.zip |
cleanup
Diffstat (limited to 't')
-rw-r--r-- | t/superuser--obsolete-and-conflict.t | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/t/superuser--obsolete-and-conflict.t b/t/superuser--obsolete-and-conflict.t index 21cb4483..63996a5c 100644 --- a/t/superuser--obsolete-and-conflict.t +++ b/t/superuser--obsolete-and-conflict.t @@ -18,36 +18,30 @@ need_root_and_prepare(); my $name = 'obsolete-and-conflict'; urpmi_addmedia("$name $::pwd/media/$name"); -urpmi('a'); -check_installed_names('a'); +test1(); +test_with_ad('b c', 'b c d'); +test_with_ad('--split-level 1 b c', 'b c d'); # perl-URPM fix for #31969 fixes this too ("d" used to be removed without asking) +test_with_ad('--auto c', 'c'); # WARNING: urpmi should promote new version of "b" instead of removing conflicting older packages -test_urpmi("b c", sprintf(<<'EOF', urpm::cfg::get_arch())); +sub test1 { + urpmi('a'); + check_installed_names('a'); + + test_urpmi("b c", sprintf(<<'EOF', urpm::cfg::get_arch())); 1/2: c 2/2: b removing package a-1-1.%s EOF -check_installed_names('b', 'c'); - -urpme('b c'); - -urpmi('a d'); -check_installed_names('a', 'd'); -urpmi('b c'); -check_installed_names('b', 'c', 'd'); - -urpme('b c d'); - -urpmi('a d'); -check_installed_names('a', 'd'); -urpmi('--split-level 1 b c'); -check_installed_names('b', 'c', 'd'); # perl-URPM fix for #31969 fixes this too ("d" used to be removed without asking) - -urpme('b c d'); + check_installed_and_remove('b', 'c'); +} -urpmi('a d'); -check_installed_names('a', 'd'); -urpmi('--auto c'); -check_installed_names('c'); # urpmi should promote new version of "b" instead of removing conflicting older packages +sub test_with_ad { + my ($para, $wanted) = @_; + urpmi('a d'); + check_installed_names('a', 'd'); + urpmi($para); + check_installed_and_remove(split ' ', $wanted); +} sub test_urpmi { my ($para, $wanted) = @_; |