Bug 100509 - First argument of a trigger script always matches second argument
First argument of a trigger script always matches second argument
Status: CLOSED ERRATA
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks: 107562
  Show dependency treegraph
 
Reported: 2003-07-22 20:15 EDT by James Olin Oden
Modified: 2007-04-18 12:55 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-12-26 20:36:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to use name of rpm causing containing trigger to determine number instances for arg1 (1.05 KB, patch)
2003-07-22 20:18 EDT, James Olin Oden
no flags Details | Diff

  None (edit)
Description James Olin Oden 2003-07-22 20:15:42 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):
4.2

How reproducible:
Every time.

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.
    
Actual results:
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).

Expected results:
For an upgrade a-1-2 the args should have been (1, 2),
and for b-1-2 they should have been (2, 1).

Additional info:
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.
Comment 1 James Olin Oden 2003-07-22 20:18:21 EDT
Created attachment 93068 [details]
Patch to use name of rpm causing containing trigger to determine number instances for arg1
Comment 2 Toralf 2003-10-22 09:06:54 EDT
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.
Comment 3 Jeff Johnson 2003-12-26 20:36:05 EST
Added (finally) in CVS, should be in rpm-4.2.2-0.8 and later.

Thanks for the patch.
Comment 5 John Flanagan 2004-05-12 00:27:17 EDT
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.

http://rhn.redhat.com/errata/RHBA-2004-098.html

Note You need to log in before you can comment on or make changes to this bug.