summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2020-04-30 17:58:44 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2020-05-01 00:35:35 +0200
commit185f13752b8cf02f51e48f6b798d478b32386f28 (patch)
treeb284d43af97acd80d61dcb7d8d5ba1d68941473d
parenta3e08228baf11b5ecaf4d3fec145f55f54673fc6 (diff)
downloadurpmi-185f13752b8cf02f51e48f6b798d478b32386f28.tar
urpmi-185f13752b8cf02f51e48f6b798d478b32386f28.tar.gz
urpmi-185f13752b8cf02f51e48f6b798d478b32386f28.tar.bz2
urpmi-185f13752b8cf02f51e48f6b798d478b32386f28.tar.xz
urpmi-185f13752b8cf02f51e48f6b798d478b32386f28.zip
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
-rw-r--r--NEWS1
-rw-r--r--t/02create_pkgs.t3
2 files changed, 4 insertions, 0 deletions
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";