aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs8
1 files changed, 6 insertions, 2 deletions
diff --git a/URPM.xs b/URPM.xs
index 14327e8..f4ac459 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -1199,7 +1199,7 @@ ts_nosignature(rpmts ts) {
return rpmtsSetVSFlags(ts, _RPMVSF_NODIGESTS | _RPMVSF_NOSIGNATURES);
}
-static void *rpmRunTransactions_callback(__attribute__((unused)) const void *h,
+static void *rpmRunTransactions_callback(const void *arg,
const rpmCallbackType what,
const rpm_loff_t amount,
const rpm_loff_t total,
@@ -1214,6 +1214,7 @@ static void *rpmRunTransactions_callback(__attribute__((unused)) const void *h,
SV *callback = NULL;
char *callback_type = NULL;
char *callback_subtype = NULL;
+ Header h = (Header) arg;
if (!td)
return NULL;
@@ -1303,7 +1304,7 @@ static void *rpmRunTransactions_callback(__attribute__((unused)) const void *h,
ENTER;
SAVETMPS;
PUSHMARK(SP);
- EXTEND(SP, callback_subtype == NULL ? 2 : 5);
+ EXTEND(SP, callback_subtype == NULL ? 3 : 6);
PUSHs(td->data);
mPUSHs(newSVpv(callback_type, 0));
PUSHs(pkgKey != NULL ? sv_2mortal(newSViv((long)pkgKey - 1)) : &PL_sv_undef);
@@ -1312,6 +1313,9 @@ static void *rpmRunTransactions_callback(__attribute__((unused)) const void *h,
mPUSHs(newSViv(amount));
mPUSHs(newSViv(total));
}
+ // for erasures, the key provided by librpm is always 0, so let's add another parameter (fullname):
+ char *s = headerGetAsString(h, RPMTAG_NVR);
+ mPUSHs(newSVpv(s, 0));
PUTBACK;
i = call_sv(callback, callback == td->callback_open ? G_SCALAR : G_DISCARD);
SPAGAIN;