[Rpm-maint] [Suse patch] Checking for identical packages on install/upgrade

Panu Matilainen pmatilai at redhat.com
Fri Jun 8 04:44:21 UTC 2007


On Tue, 5 Jun 2007, Michael Schroeder wrote:

> On Mon, Jun 04, 2007 at 11:00:16AM +0300, Panu Matilainen wrote:
>> Please do. I'm not claiming you're not right, seeing the problem would
>> help *me* understand it properly :)
>
> Say you have Jeff's rpmHeadersIdentical() in depend.cs. If you
> have two packages with same NEVR but different PKGIDs, the first
> one installed. If you try to update to the second one, depends.c
> will detect that they are different and add an erase element
> to the transaction. In psm.c, the install will find the first
> package installed and set fi->record to the header offset.
> In PSM_POST of the PSM_PKGINSTALL rpm will then remove the
> header from the database.
> Later, when the package erase transaction element is due, the
> header will already be gone, so the erase will fail, thus the
> transaction fails and rpm exits with status 1.
> I actually expected some error message, though. Oh well...

Hmm, right. Care to whip up an updated patch that does what you described? 
And adding an error message wouldn't hurt either :)

 	- Panu -



More information about the Rpm-maint mailing list