[Rpm-maint] [rpm-software-management/rpm] RFC: Use an erase element to delete packages with same NEVRA (#770)

Michael Schroeder notifications at github.com
Wed Jun 26 13:58:32 UTC 2019

Rpm used to rely on the "replacepkgs hack" to get rid of the old
header entry when reinstalling a package. This has a number of
problems when the headers are not identical or different
install flags were used.

To mitigate this, a '--reinstall' option was added that made rpm
use an erase element in this case.

This commit takes this one step further by changing the code to also
use an erase element in the --upgrade case. The code is mostly simpler,
but we need a different implementation for commit fd40d58efa, as we now
have erase elements both for --reinstall and --upgrade. Thus we
need to store the addop in the transaction element.

The commit does not change the behaviour of 'rpm --install'.
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * Use an erase element to delete packages with same NEVRA

-- File Changes --

    M lib/depends.c (38)
    M lib/rpmte.c (9)
    M lib/rpmte_internal.h (12)
    M lib/transaction.c (6)
    M lib/verify.c (2)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190626/dbdbbd12/attachment-0001.html>

More information about the Rpm-maint mailing list