summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--t/superuser--obsolete-and-conflict.t8
-rw-r--r--urpm/install.pm2
3 files changed, 8 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 3b67f123..26945335 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@
o add dummy urpmi.pm package for CPAN & proper indexation (RT#127881)
- cpan_testers:
o actually needs perl >= 5.10 for //= operator
+ o fix a test with rpm < 4.13.0
o fix failing scriptlets test with rpm < 4.13.0
o fix testsuite errors on CentOs (NVR vs NVRA)
o include /usr/local/bin in PATH
diff --git a/t/superuser--obsolete-and-conflict.t b/t/superuser--obsolete-and-conflict.t
index 5284618d..ab469b32 100644
--- a/t/superuser--obsolete-and-conflict.t
+++ b/t/superuser--obsolete-and-conflict.t
@@ -9,6 +9,7 @@
use strict;
use lib '.', 't';
use helper;
+use urpm::select;
use urpm::util;
use urpm::cfg;
use Test::More 'no_plan';
@@ -30,11 +31,12 @@ sub test1 {
check_installed_names('a');
my $arch = urpm::cfg::get_arch();
- test_urpmi("b c", sprintf(<<'EOF', $arch, $arch));
+ my $rm_msg = urpm::select::_rpm_version() gt 4.13.0 ? " a-1-1.$arch" : "";
+ test_urpmi("b c", sprintf(<<'EOF', $rm_msg || ' ', $rm_msg));
1/2: c
2/2: b
-removing package a-1-1.%s
- 1/1: removing a-1-1.%s
+removing package%s
+ 1/1: removing%s
EOF
check_installed_and_remove('b', 'c');
}
diff --git a/urpm/install.pm b/urpm/install.pm
index e0d22441..0e4cd81b 100644
--- a/urpm/install.pm
+++ b/urpm/install.pm
@@ -120,6 +120,8 @@ sub install_logger {
++$urpm->{logger_count} if $pname;
$cnt = $pname ? $urpm->{logger_count} : '-';
}
+ require urpm::select;
+ $index++ if urpm::select::_rpm_version() lt 4.13.0;
my $s = sprintf("%9s: %-22s", $cnt . "/" . $total_pkg, $pname);
print $s;
$s =~ / $/ or printf "\n%9s %-22s", '', '';