aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2018-09-16 09:57:23 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2018-09-16 18:01:52 +0200
commit9ca91793df869a41261b3bcfc552e8302d3d0159 (patch)
tree86134cbb7942dfb690602023475c8a7f9a61aa22
parent0df313294bec6d5dd759aa674bcadad46713daf5 (diff)
downloadperl-URPM-9ca91793df869a41261b3bcfc552e8302d3d0159.tar
perl-URPM-9ca91793df869a41261b3bcfc552e8302d3d0159.tar.gz
perl-URPM-9ca91793df869a41261b3bcfc552e8302d3d0159.tar.bz2
perl-URPM-9ca91793df869a41261b3bcfc552e8302d3d0159.tar.xz
perl-URPM-9ca91793df869a41261b3bcfc552e8302d3d0159.zip
restore support for rpm < 4.14.2
-rw-r--r--NEWS2
-rw-r--r--URPM.xs8
2 files changed, 10 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 9ebbb0c..6a9ed32 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- restore support for rpm < 4.14.2
+
Version 5.19 - 14 September 2018
- add support for verify callback when installing (mga#23531)
diff --git a/URPM.xs b/URPM.xs
index c8d4364..0569dfa 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -1253,12 +1253,14 @@ static void *rpmRunTransactions_callback(__attribute__((unused)) const void *h,
callback = td->callback_uninst;
callback_type = "uninst";
break;
+#ifdef RPM4_14_2
case RPMCALLBACK_VERIFY_START:
case RPMCALLBACK_VERIFY_PROGRESS:
case RPMCALLBACK_VERIFY_STOP:
callback = td->callback_verify;
callback_type = "verify";
break;
+#endif
case RPMCALLBACK_INST_START:
case RPMCALLBACK_INST_PROGRESS:
case RPMCALLBACK_INST_STOP:
@@ -1291,14 +1293,18 @@ static void *rpmRunTransactions_callback(__attribute__((unused)) const void *h,
case RPMCALLBACK_INST_START:
case RPMCALLBACK_TRANS_START:
case RPMCALLBACK_UNINST_START:
+#ifdef RPM4_14_2
case RPMCALLBACK_VERIFY_START:
+#endif
callback_subtype = "start";
gettimeofday(&tprev, NULL);
break;
case RPMCALLBACK_INST_PROGRESS:
case RPMCALLBACK_TRANS_PROGRESS:
case RPMCALLBACK_UNINST_PROGRESS:
+#ifdef RPM4_14_2
case RPMCALLBACK_VERIFY_PROGRESS:
+#endif
callback_subtype = "progress";
gettimeofday(&tcurr, NULL);
delta = 1000000 * (tcurr.tv_sec - tprev.tv_sec) + (tcurr.tv_usec - tprev.tv_usec);
@@ -1310,7 +1316,9 @@ static void *rpmRunTransactions_callback(__attribute__((unused)) const void *h,
case RPMCALLBACK_INST_STOP:
case RPMCALLBACK_TRANS_STOP:
case RPMCALLBACK_UNINST_STOP:
+#ifdef RPM4_14_2
case RPMCALLBACK_VERIFY_STOP:
+#endif
callback_subtype = "stop";
break;
case RPMCALLBACK_CPIO_ERROR: