summaryrefslogtreecommitdiff
path: root/lib/psm.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-05-25 15:38:15 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-05-25 15:38:15 +0300
commit2c54c6abbf4c6ee44d0693133a2f373621832ffb (patch)
tree69981d4a59fc24ce856d6eee3e96c8035e989839 /lib/psm.c
parenta2b999df2e71dd7b595ad329e26efe80eabb9d1f (diff)
downloadlibrpm-tizen-2c54c6abbf4c6ee44d0693133a2f373621832ffb.tar.gz
librpm-tizen-2c54c6abbf4c6ee44d0693133a2f373621832ffb.tar.bz2
librpm-tizen-2c54c6abbf4c6ee44d0693133a2f373621832ffb.zip
Move scriptlet statistics collection (back) inside psm
- removes one rpmts dependency from scriptlets
Diffstat (limited to 'lib/psm.c')
-rw-r--r--lib/psm.c5
1 files changed, 4 insertions, 1 deletions
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;