aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2020-04-29 05:44:03 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2020-04-29 05:55:43 +0200
commit3eff1f6b63309697d4916ab646f289be7af4a8b9 (patch)
tree64c398db12e06f9e574b02de64d33e9fb757dc7a
parent54a0ee60730839c3e461b3e81b188f22a41321cc (diff)
downloadperl-URPM-3eff1f6b63309697d4916ab646f289be7af4a8b9.tar
perl-URPM-3eff1f6b63309697d4916ab646f289be7af4a8b9.tar.gz
perl-URPM-3eff1f6b63309697d4916ab646f289be7af4a8b9.tar.bz2
perl-URPM-3eff1f6b63309697d4916ab646f289be7af4a8b9.tar.xz
perl-URPM-3eff1f6b63309697d4916ab646f289be7af4a8b9.zip
restore support for rpm-4.9
-rwxr-xr-xMakefile.PL6
-rw-r--r--NEWS1
-rw-r--r--URPM.xs14
3 files changed, 20 insertions, 1 deletions
diff --git a/Makefile.PL b/Makefile.PL
index 080003d..9f26e1e 100755
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -4,7 +4,7 @@ use ExtUtils::PkgConfig;
# minimum required version of dependencies we need to build
our %build_reqs = (
- 'rpm' => '4.11.0',
+ 'rpm' => '4.9.0',
);
our %CONFIGURE_REQUIRES = (
'ExtUtils::Depends' => '0.300',
@@ -40,6 +40,7 @@ print $FH "/* File generated by Makefile.PL\n";
print $FH " */\n\n";
print $FH "#ifndef RPMVERSION_H\n#define RPMVERSION_H\n\n";
foreach (qw(
+ 4.10.0
4.11.0
4.12.0
4.13.0
@@ -56,6 +57,9 @@ print $FH "\n#endif\n";
close($FH);
my $workaround;
+if (-e '/etc/mageia-release' && $cfg{modversion} =~ /4\.9\./) {
+ $workaround = '-DPATCHED_MGA';
+}
if (! -e '/etc/mageia-release' && -e '/etc/redhat-release' && $cfg{modversion} =~ /4.11/) {
$workaround = '-DPATCHED_RH';
}
diff --git a/NEWS b/NEWS
index bd2ce8a..d40b902 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
- fix testing on pre UsrMove Linuxes (eg: mga2)
+- restore support for rpm-4.9
Version 5.26 - 21 April 2020
diff --git a/URPM.xs b/URPM.xs
index 0b31798..8871082 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -119,6 +119,14 @@ typedef struct s_Package* URPM__Package;
#define FILTER_MODE_DOC_FILES 1
#define FILTER_MODE_CONF_FILES 2
+#ifndef RPM4_11_0
+#ifdef PATCHED_MGA
+#define RPMTAG_RECOMMENDNAME RPMTAG_SUGGESTSNAME
+#define RPMTAG_RECOMMENDFLAGS RPMTAG_SUGGESTSFLAGS
+#define RPMTAG_RECOMMENDVERSION RPMTAG_SUGGESTSVERSION
+#endif
+#endif
+
#ifdef RPM4_11_0
#ifndef RPM4_12_0
#ifndef PATCHED_RH
@@ -1275,15 +1283,19 @@ static void *rpmRunTransactions_callback(__attribute__((unused)) const void *h,
#endif
case RPMCALLBACK_INST_START:
case RPMCALLBACK_INST_PROGRESS:
+#ifdef RPM4_10_0
case RPMCALLBACK_INST_STOP:
+#endif
callback = td->callback_inst;
callback_type = "inst";
break;
+#ifdef RPM4_10_0
case RPMCALLBACK_SCRIPT_START:
case RPMCALLBACK_SCRIPT_STOP:
callback = td->callback_inst;
callback_type = "script";
break;
+#endif
case RPMCALLBACK_CPIO_ERROR:
case RPMCALLBACK_SCRIPT_ERROR:
case RPMCALLBACK_UNPACK_ERROR:
@@ -1325,7 +1337,9 @@ static void *rpmRunTransactions_callback(__attribute__((unused)) const void *h,
else
tprev = tcurr;
break;
+#ifdef RPM4_10_0
case RPMCALLBACK_INST_STOP:
+#endif
case RPMCALLBACK_TRANS_STOP:
case RPMCALLBACK_UNINST_STOP:
#ifdef RPM4_14_2