diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2020-01-03 06:17:45 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2020-01-07 03:46:00 +0100 |
commit | 9c8f8e738664f2905e3927e5806bb14da4a5272b (patch) | |
tree | 69493b07485f36e58f1c3c3375bad7bb3b219fa1 | |
parent | 1a8a7e30293696aa472beb21efd361a4b1c99ebe (diff) | |
download | perl-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-x | Makefile.PL | 6 | ||||
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | URPM.xs | 2 |
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"; @@ -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 @@ -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); |