aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2020-01-03 06:17:45 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2020-01-07 03:46:00 +0100
commit9c8f8e738664f2905e3927e5806bb14da4a5272b (patch)
tree69493b07485f36e58f1c3c3375bad7bb3b219fa1
parent1a8a7e30293696aa472beb21efd361a4b1c99ebe (diff)
downloadperl-URPM-9c8f8e738664f2905e3927e5806bb14da4a5272b.tar
perl-URPM-9c8f8e738664f2905e3927e5806bb14da4a5272b.tar.gz
perl-URPM-9c8f8e738664f2905e3927e5806bb14da4a5272b.tar.bz2
perl-URPM-9c8f8e738664f2905e3927e5806bb14da4a5272b.tar.xz
perl-URPM-9c8f8e738664f2905e3927e5806bb14da4a5272b.zip
Workaround CPAN testers that run CentOS 7 (RT#131163)
Their rpm is patched for weak deps. An alternative would be to have a better check
-rwxr-xr-xMakefile.PL6
-rw-r--r--NEWS1
-rw-r--r--URPM.xs2
3 files changed, 8 insertions, 1 deletions
diff --git a/Makefile.PL b/Makefile.PL
index a6e2492..d3b72e6 100755
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -54,7 +54,11 @@ foreach (qw(
print $FH "\n#endif\n";
close($FH);
-my $ccflags = join(' ', '-Wall -Wextra -fno-strict-aliasing', $cfg{cflags}, "-DRPM_VERSON=$cfg{modversion}");
+my $workaround;
+if (-e '/etc/redhat-release' && $cfg{modversion} =~ /4.11/) {
+ $workaround = '-DPATCHED_RH';
+}
+my $ccflags = join(' ', '-Wall -Wextra -fno-strict-aliasing', $cfg{cflags}, "-DRPM_VERSON=$cfg{modversion}", $workaround);
print "Found RPM version $cfg{modversion} (compiling with flags: $ccflags)\n";
diff --git a/NEWS b/NEWS
index 5d775cb..c23f82a 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@
- CPAN testers:
o display rpm version in flags
o workaround CPAN testers that run FreeBSD (RT#131162)
+ o Workaround CPAN testers that run CentOS 7 (RT#131163)
Version 5.23.2 - 30 December 2019
diff --git a/URPM.xs b/URPM.xs
index efdacbd..465ed14 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -121,11 +121,13 @@ typedef struct s_Package* URPM__Package;
#ifdef RPM4_11_0
#ifndef RPM4_12_0
+#ifndef PATCHED_RH
#define RPMTAG_RECOMMENDNAME RPMTAG_SUGGESTSNAME
#define RPMTAG_RECOMMENDFLAGS RPMTAG_SUGGESTSFLAGS
#define RPMTAG_RECOMMENDVERSION RPMTAG_SUGGESTSVERSION
#endif
#endif
+#endif
static ssize_t write_nocheck(int fd, const void *buf, size_t count) {
return write(fd, buf, count);