From 2c54c6abbf4c6ee44d0693133a2f373621832ffb Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 25 May 2010 15:38:15 +0300 Subject: Move scriptlet statistics collection (back) inside psm - removes one rpmts dependency from scriptlets --- lib/psm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/psm.c') diff --git a/lib/psm.c b/lib/psm.c index 75cafcb9f..a31a9a6f9 100644 --- a/lib/psm.c +++ b/lib/psm.c @@ -414,12 +414,15 @@ static rpmRC runScript(rpmpsm psm, ARGV_const_t prefixes, rpmRC rc = RPMRC_OK; int warn_only =(script->tag != RPMTAG_PREIN && script->tag != RPMTAG_PREUN); + rpmswEnter(rpmtsOp(psm->ts, RPMTS_OP_SCRIPTLETS), 0); + rc = rpmScriptRun(script, arg1, arg2, psm->ts, prefixes, warn_only); + rpmswExit(rpmtsOp(psm->ts, RPMTS_OP_SCRIPTLETS), 0); + /* * Notify callback for all errors. "total" abused for warning/error, * rc only reflects whether the condition prevented install/erase * (which is only happens with %prein and %preun scriptlets) or not. */ - rc = rpmScriptRun(script, arg1, arg2, psm->ts, prefixes, warn_only); if (rc != RPMRC_OK) { if (warn_only) { rc = RPMRC_OK; -- cgit v1.2.3