aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-02-10 17:06:12 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-02-10 17:06:12 +0000
commitb3dee838bd9904ab375817f09f28cb193a18a59c (patch)
tree4e7b1f220a51b63a02e617644ffafdc3cfe6ef3b /URPM.xs
parent51a37c1c1fe34f10b115d0ad62c9dce4cbf51cbd (diff)
downloadperl-URPM-b3dee838bd9904ab375817f09f28cb193a18a59c.tar
perl-URPM-b3dee838bd9904ab375817f09f28cb193a18a59c.tar.gz
perl-URPM-b3dee838bd9904ab375817f09f28cb193a18a59c.tar.bz2
perl-URPM-b3dee838bd9904ab375817f09f28cb193a18a59c.tar.xz
perl-URPM-b3dee838bd9904ab375817f09f28cb193a18a59c.zip
repackage also when only the rpm macro is defined. Maybe rpm ought to do this,
but obviously, as of 4.4.4, it does not.
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs11
1 files changed, 7 insertions, 4 deletions
diff --git a/URPM.xs b/URPM.xs
index 53541dd..614d9b6 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -2930,10 +2930,6 @@ Trans_run(trans, data, ...)
URPM::Transaction trans
SV *data
PREINIT:
- /* available callback:
- callback(data, 'open'|'close', id|undef)
- callback(data, 'trans'|'uninst'|'inst', id|undef, 'start'|'progress'|'stop', amount, total)
- */
struct s_TransactionData td = { NULL, NULL, NULL, NULL, NULL, 100000, data };
rpmtransFlags transFlags = RPMTRANS_FLAG_NONE;
int probFilter = 0;
@@ -2984,6 +2980,13 @@ Trans_run(trans, data, ...)
}
}
}
+ /* check macros */
+ {
+ char *repa = rpmExpand("%_repackage_all_erasures", NULL);
+ if (repa && *repa && *repa != '0')
+ transFlags |= RPMTRANS_FLAG_REPACKAGE;
+ if (repa) free(repa);
+ }
rpmtsSetFlags(trans->ts, transFlags);
rpmtsSetNotifyCallback(trans->ts, rpmRunTransactions_callback, &td);
if (rpmtsRun(trans->ts, NULL, probFilter) > 0) {