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

Michael Schroeder mls at suse.de
Fri Jun 8 13:27:59 UTC 2007


On Fri, Jun 08, 2007 at 07:44:21AM +0300, Panu Matilainen wrote:
> Hmm, right. Care to whip up an updated patch that does what you described? 

The patch is in my other mail about psm.c.

> And adding an error message wouldn't hurt either :)

Well, that's deep in psm.c. What happens is that stage PSM_PKGERASE
calls PSM_INIT, which calls PSM_RPMDB_LOAD, which returns an error but
doesn't print anything. Maybe the correct place is thus in PSM_INIT,
right after the "Retrieve installed header" comment.
E.g.:

    rc = rpmpsmNext(psm, PSM_RPMDB_LOAD);
    if (rc != RPMRC_OK)
	rpmError(RPMERR_INTERNAL, _("header retrieval failed for #%u\n", fi->record));
    else if (psm->te)
	psm->te->h = headerLink(fi->h);

Cheers,
  Michael.

-- 
Michael Schroeder                                   mls at suse.de
SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}



More information about the Rpm-maint mailing list