summaryrefslogtreecommitdiff
path: root/lib/rpmtriggers.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2018-02-16 14:29:28 +0200
committerPanu Matilainen <pmatilai@redhat.com>2018-02-16 14:29:28 +0200
commit7400a36b982fd315eb30d893321af0283f57205d (patch)
tree58c0be63d7b2aa6f71becb1ee3acbae7e3590fac /lib/rpmtriggers.c
parentc3991587c92c365551436f03de09cfe5a31f3e9f (diff)
downloadrpm-7400a36b982fd315eb30d893321af0283f57205d.tar.gz
Eliminate file trigger second argument (aka $2)
File triggers have gotten both $1 and $2 as zero always, which doesn't make a whole lot of sense. For $1 we know what to do (it should be the same as with all other scriptlet types) but $2 is not so obvious. For regular triggers it's the number of remaining instances of the target package, but with file triggers there are any number of target packages and it's not clear what the most useful thing would be. Better not pass it at all to make it free for future use once we figure what to do with it.
Diffstat (limited to 'lib/rpmtriggers.c')
-rw-r--r--lib/rpmtriggers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rpmtriggers.c b/lib/rpmtriggers.c
index 23a913d35..cb2441c5a 100644
--- a/lib/rpmtriggers.c
+++ b/lib/rpmtriggers.c
@@ -187,7 +187,7 @@ int runPostUnTransFileTrigs(rpmts ts)
headerGet(trigH, RPMTAG_INSTPREFIXES, &installPrefixes,
HEADERGET_ALLOC|HEADERGET_ARGV);
- nerrors += runScript(ts, NULL, trigH, installPrefixes.data, script, 0, 0);
+ nerrors += runScript(ts, NULL, trigH, installPrefixes.data, script, 0, -1);
rpmtdFreeData(&installPrefixes);
rpmScriptFree(script);
headerFree(trigH);
@@ -437,7 +437,7 @@ static int runHandleTriggersInPkg(rpmts ts, rpmte te, Header h,
rpmScriptSetNextFileFunc(script, inputFunc, mfi);
nerrors += runScript(ts, te, h, installPrefixes.data,
- script, 0, 0);
+ script, 0, -1);
rpmtdFreeData(&installPrefixes);
rpmScriptFree(script);
}