[Rpm-maint] [rpm-software-management/rpm] Add rpmtsAddEraseElement2 to API, extend rpmtsAddEraseElement with key data (#1360)

Panu Matilainen notifications at github.com
Fri Sep 18 08:19:49 UTC 2020

Adding this would only make a strange API even stranger.
- The purpose of the key argument is to allow install callback to locate and open the associated package file. There's no counterpart for erasure.
- Any implicitly added erasures (for upgrades and obsoletes) would still not have a key
- The name is indeed ugly, and carrying over deprecated parameters to new API calls doesn't make it any better

I can see a need for carrying "user data" in rpmte, but the key has a very specific meaning in rpm and overloading this to other purposes is not likely to end well.

Thinking about this, I think a more constructive approach would be adding a separate userdata member to transaction elements and an optional transaction set callback which gets called whenever something changes in the transaction set, which can be used for setting userdata on both explicitly and implicitly added elements (and whatever other purposes) and doesn't require ugly foo2() functions (or API breakage).

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/20200918/f7fd4256/attachment.html>

More information about the Rpm-maint mailing list