From 185f13752b8cf02f51e48f6b798d478b32386f28 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 30 Apr 2020 17:58:44 +0200 Subject: fix running genhlist2 with the right perl version Else genhdlist2 may fail to load URPM if it doesn't use the perl version for which URPM was installed. This affects CPAN smokers where several perl versions are installed. Eg in http://www.cpantesters.org/cpan/report/6808b728-8a34-11ea-bab2-e37d1f24ea8f CPAN says INC= /usr/perl5.30.0p/lib/site_perl/5.30.0/amd64-freebsd /usr/perl5.30.0p/lib/site_perl/5.30.0 /usr/perl5.30.0p/lib/5.30.0/amd64-freebsd /usr/perl5.30.0p/lib/5.30.0 Which is consistent with $^X = /usr/perl5.30.0p/bin/perl5.30.0 But genhdlist2 fails with: Can't locate URPM.pm in @INC (you may need to install the URPM module) (@INC contains: /usr/home/cpansand/.cpan/build/2020042914/urpmi-v8.122-1/blib/lib /usr/home/cpansand/.cpan/build/2020042914/urpmi-v8.122-1/blib/arch /usr/perl5.28.2-RC1p/lib/site_perl/5.28.2/amd64-freebsd /usr/perl5.28.2-RC1p/lib/site_perl/5.28.2 /usr/perl5.28.2-RC1p/lib/5.28.2/amd64-freebsd /usr/perl5.28.2-RC1p/lib/5.28.2 .) at /usr/home/cpansand/.cpan/build/2020042914/urpmi-v8.122-1/t/genhdlist2 line 6. BEGIN failed--compilation aborted at /usr/home/cpansand/.cpan/build/2020042914/urpmi-v8.122-1/t/genhdlist2 line 6. Ie it used the wrong perl-5.28.2 instead of perl-5.30.0 --- NEWS | 1 + t/02create_pkgs.t | 3 +++ 2 files changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 983c7a4d..8579e5ef 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ - cpan_testers: o BSD: prevent failing due to broken deps generator o do not skip network tests on pre-UsrMove distros (eg: Mageia 2) + o fix running genhlist2 with the right perl version o fix running testsuite with rpm-4.9 o fix testuite if glibc-static-devel isn't installed on Mageia 2 o needs URPM 5.28 for maximal portability diff --git a/t/02create_pkgs.t b/t/02create_pkgs.t index d585209f..65eec471 100644 --- a/t/02create_pkgs.t +++ b/t/02create_pkgs.t @@ -9,6 +9,9 @@ use Cwd; set_path(); +# fix bundled genhdlist2 & co to use the right perl on CPAN smokers: +system($^X, '-pi', '-e', qq(s@^#!/usr/bin/perl.*@#!$^X@), $_) foreach qw(gendistrib genhdlist2); + my $is_bsd = $Config{archname} =~ /bsd/; warn ">> RPM version is: ", `LC_ALL=C rpm --version`, "\n"; -- cgit v1.2.1