[Rpm-maint] [rpm-software-management/rpm] Add support for %preuntrans and %postuntrans scriptlets (PR #2177)

Panu Matilainen notifications at github.com
Thu Sep 8 09:44:59 UTC 2022


These are obviously the long lost uninstall-time counterparts of %pretrans and %posttrans.

%preuntrans is easy but %postuntrans is the reason this hasn't been implemented so far: by the time it's supposed to execute, the header will be gone. Work around this by allowing the rpmte to hold on to its header if it has a %postuntrans scriptlet.

Cheapskate on transaction flags are reuse pre/posttrans flags for these uninstall counterparts too, adding separate flags and disablers just doesn't seem worth it, especially as we're quite short of free bits.
    
Fixes: #2119
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/2177

-- Commit Summary --

  * Fix %posttrans argument on upgrade
  * Add support for %preuntrans and %postuntrans scriptlets

-- File Changes --

    M build/parseScript.c (20)
    M build/parseSpec.c (4)
    M build/rpmbuild_internal.h (6)
    M docs/manual/tags.md (14)
    M docs/manual/triggers.md (2)
    M include/rpm/rpmtag.h (6)
    M include/rpm/rpmts.h (8)
    M lib/psm.c (30)
    M lib/rpmscript.c (6)
    M lib/rpmscript.h (2)
    M lib/rpmte.c (35)
    M lib/rpmte_internal.h (2)
    M lib/transaction.c (27)
    M tests/data/SPECS/scriptfail.spec (2)
    M tests/data/SPECS/scripts.spec (6)
    M tests/rpmgeneral.at (6)
    M tests/rpmscript.at (37)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/2177.patch
https://github.com/rpm-software-management/rpm/pull/2177.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2177
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2177 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220908/cd1bdcbc/attachment.html>


More information about the Rpm-maint mailing list