From a222687b1d4efa428654d5b6fd72fcb8fe1bf943 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 17 Jan 2020 16:48:41 +0100 Subject: fix a test on Fedora where perl main package is perl-interpreter --- NEWS | 1 + t/rpmdb.t | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index ac178f4..89ff853 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ - CPAN testers: o display rpm version in flags o fix indexation (RT#127881) + o fix a test on Fedora where perl main package is perl-interpreter o workaround CPAN testers that run FreeBSD (RT#131162) o Workaround CPAN testers that run CentOS 7 (RT#131163) diff --git a/t/rpmdb.t b/t/rpmdb.t index fd4db8f..6587f7d 100644 --- a/t/rpmdb.t +++ b/t/rpmdb.t @@ -25,10 +25,11 @@ my ($pkg_perl, $count_perl, $pkg_perl_extern); #- arch is void for -pubkey- package. my $fullname = "$name-$version-$release"; push @all_pkgs, $fullname; - if ($name eq 'perl') { $pkg_perl_extern = $fullname } + $pkg_perl_extern = $fullname if $name eq 'perl' || $name eq 'perl-interpreter'; }); - $count_perl = $db->traverse_tag('name', ['perl'], sub { + my $perl = -e "/etc/redhat-release" ? qx(rpm -qf /bin/perl --qf '%{name}') : 'perl'; + $count_perl = $db->traverse_tag('name', [$perl], sub { my ($pkg) = @_; my ($name, $version, $release) = $pkg->fullname; $pkg_perl = "$name-$version-$release"; -- cgit v1.2.1