Red Hat Bugzilla – Bug 100509
First argument of a trigger script always matches second argument
Last modified: 2007-04-18 12:55:59 EDT
Description of problem:
Given two rpms a and b where b has an install trigger on a. Whenever
the trigger is ran, the first argument passed to the trigger will
always equal the second argument (the first being the number of
instances of the trigger containing rpm and the second being the
the number of instances of the triggering rpm).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Install rpm a-1-1 and b-1-1 on the system in one transaction.
2. Upgrade to a-1-2 or b-1-2.
If you upgrade to a-1-2 then the args will be (2, 2) respectively.
If you had upgraded to b-1-2 the args will be (1, 1).
For an upgrade a-1-2 the args should have been (1, 2),
and for b-1-2 they should have been (2, 1).
Jeff, your basically using the name you got from the dependency list
to determine the count of instances of the rpm containing the trigger.
Just need to take the triggerH and get the name from that to get this
info. I have a patch for this.
Created attachment 93068 [details]
Patch to use name of rpm causing containing trigger to determine number instances for arg1
I'm having a different problem that I think may be related:
If b (in the above example) has an an *uninstall* trigger, it is executed with
$1 = 0 on upgrade to b-1-2. $1 should have been 1, I think, since b is still
installed after the upgrade.
Added (finally) in CVS, should be in rpm-4.2.2-0.8 and later.
Thanks for the patch.
An errata has been issued which should help the problem described in this bug report.
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen
this bug report if the solution does not work for you.