diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2017-12-15 12:30:11 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2018-03-28 14:09:16 +0300 |
commit | 9afe781d960d354a9576d4d58b1a36a0f39405bc (patch) | |
tree | e9b1f469ea6089801d6d64d9e38269557aae8195 | |
parent | 335a7ed45bd3c5877ae321e21a84b96c768ff3a2 (diff) | |
download | rpm-9afe781d960d354a9576d4d58b1a36a0f39405bc.tar.gz |
Fixup transfiletrigger comments
There's no "this package" in %transfiletrigger concept, eliminate
misleading copy-paste comments (this is relevant inside psm).
Use actual trigger names to make it easier to see what is what.
(cherry picked from commit 20c9f258b5f645e3a3a68757a9be9915d67b248b)
-rw-r--r-- | lib/transaction.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/transaction.c b/lib/transaction.c index a74e6c4e6..a2af2b57d 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -1500,18 +1500,19 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet) goto exit; } + /* Run %transfiletriggerun scripts unless disabled */ if (!(rpmtsFlags(ts) & (RPMTRANS_FLAG_BUILD_PROBS|RPMTRANS_FLAG_NOPRETRANS| RPMTRANS_FLAG_NOTRIGGERUN) || rpmpsNumProblems(tsprobs))) { - /* Run file triggers in this package other package(s) set off. */ runFileTriggers(ts, NULL, RPMSENSE_TRIGGERUN, RPMSCRIPT_TRANSFILETRIGGER, 0); - /* Run file triggers in other package(s) this package sets off. */ runTransScripts(ts, PKG_TRANSFILETRIGGERUN); } - /* Run pre-transaction scripts, but only if there are no known - * problems up to this point and not disabled otherwise. */ + /* Run %pretrans scripts, but only if there are no known problems up to + * this point and not disabled otherwise. This is evil as it runs before + * fingerprinting and problem checking and is best avoided. + */ if (!((rpmtsFlags(ts) & (RPMTRANS_FLAG_BUILD_PROBS|RPMTRANS_FLAG_NOPRETRANS)) || (rpmpsNumProblems(tsprobs)))) { rpmlog(RPMLOG_DEBUG, "running pre-transaction scripts\n"); @@ -1548,13 +1549,13 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet) /* Actually install and remove packages, get final exit code */ rc = rpmtsProcess(ts) ? -1 : 0; - /* Run post-transaction scripts unless disabled */ + /* Run %posttrans scripts unless disabled */ if (!(rpmtsFlags(ts) & (RPMTRANS_FLAG_NOPOSTTRANS))) { rpmlog(RPMLOG_DEBUG, "running post-transaction scripts\n"); runTransScripts(ts, PKG_POSTTRANS); } - /* Run file triggers in other package(s) this package sets off. */ + /* Run %transfiletriggerpostun scripts unless disabled */ if (!(rpmtsFlags(ts) & (RPMTRANS_FLAG_NOPOSTTRANS|RPMTRANS_FLAG_NOTRIGGERIN))) { runFileTriggers(ts, NULL, RPMSENSE_TRIGGERIN, RPMSCRIPT_TRANSFILETRIGGER, 0); } @@ -1562,7 +1563,7 @@ int rpmtsRun(rpmts ts, rpmps okProbs, rpmprobFilterFlags ignoreSet) runPostUnTransFileTrigs(ts); } - /* Run file triggers in this package other package(s) set off. */ + /* Run %transfiletriggerin scripts unless disabled */ if (!(rpmtsFlags(ts) & (RPMTRANS_FLAG_NOPOSTTRANS|RPMTRANS_FLAG_NOTRIGGERIN))) { runTransScripts(ts, PKG_TRANSFILETRIGGERIN); } |