From b870c2c387e563b5b8354420ffd9aa0b386dcf07 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 17 Jan 2020 03:54:32 +0100 Subject: cpan_testers: fix a test with rpm < 4.13.0 It was failing for older versions of rpm since commit 32c4bc874e3f7fc99188bf045902b1018f38855a This fix the counting & adjust to missing pkg name when erasing with older rpms --- t/superuser--obsolete-and-conflict.t | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 't') 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'); } -- cgit v1.2.1