[Rpm-maint] [rpm-software-management/rpm] Reimplement --restore as a transaction element, obsolete --setperms & co (PR #1894)
Panu Matilainen
notifications at github.com
Fri Jan 21 08:50:50 UTC 2022
--setperms, --setugids and --setcaps were fun demos of alias capabilities
in the nineties, but they can be downright dangerous when used
separately, are blisfully unaware of all state in rpm yet try to
duplicate functionality existing in C, and thus are a constant source
of bugs that are between hard to impossible to fix in the alias space.
Add a new transaction element type for the restore operation, wire
through all the necessary places. In places (like ordering) this is
an overkill but otherwise it seems like a natural thing to be able
to process restore alongside package install/remove. The restore
operation is a cross between install and erase codepath-wise so touches
some funny places, but FA_TOUCH does just the thing, and now all the
regular disablers like --nocontext and --nocaps can be used if
necessary.
Remove the dangerous shell implementations of things and just make them
aliases to --restore.
Fixes: #965
You can view, comment on, or merge this pull request online at:
https://github.com/rpm-software-management/rpm/pull/1894
-- Commit Summary --
* Reimplement --restore as a transaction element, obsolete --setperms & co
-- File Changes --
M lib/depends.c (22)
M lib/order.c (8)
M lib/poptI.c (4)
M lib/psm.c (35)
M lib/rpmcli.h (3)
M lib/rpminstall.c (17)
M lib/rpmte.c (5)
M lib/rpmte.h (1)
M lib/rpmte_internal.h (2)
M lib/rpmts.h (8)
M lib/transaction.c (9)
M rpmpopt.in (33)
-- Patch Links --
https://github.com/rpm-software-management/rpm/pull/1894.patch
https://github.com/rpm-software-management/rpm/pull/1894.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1894
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/1894 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220121/ba5f49c8/attachment-0001.html>
More information about the Rpm-maint
mailing list