aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2020-01-17 18:14:16 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2020-01-17 18:14:16 +0100
commitfd43bab38200c17a617996a3b38ed703c7eec530 (patch)
tree6b42d5da61052d20d02f96fad9873270243066c1
parent16306402adf932a7fc0ce7860a72946c2bb26fc5 (diff)
downloadperl-URPM-fd43bab38200c17a617996a3b38ed703c7eec530.tar
perl-URPM-fd43bab38200c17a617996a3b38ed703c7eec530.tar.gz
perl-URPM-fd43bab38200c17a617996a3b38ed703c7eec530.tar.bz2
perl-URPM-fd43bab38200c17a617996a3b38ed703c7eec530.tar.xz
perl-URPM-fd43bab38200c17a617996a3b38ed703c7eec530.zip
make test more universal
-rw-r--r--NEWS2
-rw-r--r--t/rpmdb.t4
2 files changed, 4 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 6cd9f45..a3316bf 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- make test pass on most distros
+
Version 5.24 - 17 January 2020
- fix support for hdlist compressed with !gzip
diff --git a/t/rpmdb.t b/t/rpmdb.t
index 6587f7d..fd99220 100644
--- a/t/rpmdb.t
+++ b/t/rpmdb.t
@@ -19,16 +19,16 @@ my ($pkg_perl, $count_perl, $pkg_perl_extern);
@all_pkgs_extern = sort { $a cmp $b } split /\n/ => qx(rpm -qa --nosignature --qf '%{name}-%{version}-%{release}\n');
ok(@all_pkgs_extern > 0, 'There are RPMs');
+ my $perl = -e '/etc/redhat-release' || -e '/etc/mageia-release' ? qx(rpm -qf /bin/perl --qf '%{name}') : 'perl';
$count = $db->traverse(sub {
my ($pkg) = @_;
my ($name, $version, $release, $arch) = $pkg->fullname;
#- arch is void for -pubkey- package.
my $fullname = "$name-$version-$release";
push @all_pkgs, $fullname;
- $pkg_perl_extern = $fullname if $name eq 'perl' || $name eq 'perl-interpreter';
+ $pkg_perl_extern = $fullname if $name eq $perl;
});
- 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;