diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2020-01-17 16:48:41 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2020-01-17 17:54:37 +0100 |
commit | a222687b1d4efa428654d5b6fd72fcb8fe1bf943 (patch) | |
tree | c504152a4ab64414df99970a881278ade56fc6df /t | |
parent | b8c2215c07b4b9fcb7abbcaeda3dd232414dc523 (diff) | |
download | perl-URPM-a222687b1d4efa428654d5b6fd72fcb8fe1bf943.tar perl-URPM-a222687b1d4efa428654d5b6fd72fcb8fe1bf943.tar.gz perl-URPM-a222687b1d4efa428654d5b6fd72fcb8fe1bf943.tar.bz2 perl-URPM-a222687b1d4efa428654d5b6fd72fcb8fe1bf943.tar.xz perl-URPM-a222687b1d4efa428654d5b6fd72fcb8fe1bf943.zip |
fix a test on Fedora where perl main package is perl-interpreter
Diffstat (limited to 't')
-rw-r--r-- | t/rpmdb.t | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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"; |