summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2021-10-23 14:25:51 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2021-10-31 05:38:17 +0100
commit60d57c688444600942c9fd8b464bd5e0ef286266 (patch)
tree0900012b9cd0b868b2e1d1b664c4ce9d12f4623f
parentef747ae994b83e294b0cb3cd95f57c4e9d4dc98c (diff)
downloadurpmi-60d57c688444600942c9fd8b464bd5e0ef286266.tar
urpmi-60d57c688444600942c9fd8b464bd5e0ef286266.tar.gz
urpmi-60d57c688444600942c9fd8b464bd5e0ef286266.tar.bz2
urpmi-60d57c688444600942c9fd8b464bd5e0ef286266.tar.xz
urpmi-60d57c688444600942c9fd8b464bd5e0ef286266.zip
Skip rpm-v3 tests on known broken versions of rpm
We know that 4.15.1.1 & 4.16.1.3 had a bad regression regarding handling old rpm v3 packages. See https://github.com/rpm-software-management/rpm/issues/1635 So just skip those tests on affected CPAN smokers. Eg: http://www.cpantesters.org/cpan/report/db1b368e-c68b-11eb-8660-be641f24ea8f error: [fd 10]: invalid signature tag Archivesize (1046) bad rpm media/rpm-v3_no_subdir/libtermcap-2.0.8-2.i386.rpm Failed test 'genhdlist2 --xml-info media/rpm-v3_no_subdir' at t/helper.pm line 151.
-rw-r--r--Changes3
-rw-r--r--t/02create_pkgs.t2
-rw-r--r--t/helper.pm5
-rw-r--r--t/superuser--media_info_dir.t2
4 files changed, 9 insertions, 3 deletions
diff --git a/Changes b/Changes
index 4c199d99..19132915 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+- cpan_testers:
+ o skip rpm-v3 tests on known broken versions of rpm
+
Version 8.126 - 5 June 2021
- Convert from bdb backend to sqlite when using rpm >= 4.16
diff --git a/t/02create_pkgs.t b/t/02create_pkgs.t
index 65eec471..7bd625f3 100644
--- a/t/02create_pkgs.t
+++ b/t/02create_pkgs.t
@@ -65,7 +65,7 @@ foreach my $spec (glob("data/SPECS/srpm*.spec")) {
genhdlist_std($name);
}
-{
+if (!is_rpm_v3_support_broken()) {
my $name = 'rpm-v3';
system_("cp -r data/$name media");
system_("cp -r media/$name media/${name}_nohdlist");
diff --git a/t/helper.pm b/t/helper.pm
index 74e0eb07..30f1768c 100644
--- a/t/helper.pm
+++ b/t/helper.pm
@@ -7,7 +7,7 @@ use urpm::select;
use urpm::util;
use base 'Exporter';
our @EXPORT = qw(need_root_and_prepare need_downloader
- are_weak_deps_supported is_mageia
+ are_weak_deps_supported is_mageia is_rpm_v3_support_broken
start_httpd httpd_port
urpmi_addmedia urpmi_addmedia_should_retry urpmi_removemedia urpmi_update
urpm_cmd run_urpm_cmd urpmi_cmd urpmi urpmi_partial test_urpmi_fail urpme
@@ -217,6 +217,9 @@ sub is_mageia() {
sub are_weak_deps_supported() {
return urpm::select::_rpm_version() gt 4.12.0;
}
+sub is_rpm_v3_support_broken() {
+ return member(urpm::select::_rpm_version(), qw(4.15.1.1 4.16.1.3));
+}
END {
$using_root and system('rm -rf root');
diff --git a/t/superuser--media_info_dir.t b/t/superuser--media_info_dir.t
index d2575b0a..56bdc1c5 100644
--- a/t/superuser--media_info_dir.t
+++ b/t/superuser--media_info_dir.t
@@ -11,7 +11,7 @@ need_root_and_prepare();
various();
urpmq_various();
urpmi_force_skip_unknown();
-rpm_v3();
+rpm_v3() if !is_rpm_v3_support_broken();
sub various {
my $name = 'various';