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

Jaroslav Rohel notifications at github.com
Fri Sep 18 07:43:50 UTC 2020


Transaction set API offers functions to add items (packages) to transaction set:
```
int rpmtsAddInstallElement(rpmts ts, Header h, const fnpyKey key, int upgrade,
		rpmRelocation * relocs);
int rpmtsAddReinstallElement(rpmts ts, Header h, const fnpyKey key);
int rpmtsAddEraseElement(rpmts ts, Header h, int dboffset);
```

User can attach user data ("key" argument) to the transaction item.
However, user data cannot be attached in the case of `rpmtsAddEraseElement`
function.

This fix add a new API function `rpmtsAddEraseElement2` (to not break
the existing one) with added parameter `key` parameter.

`int rpmtsAddEraseElement2(rpmts ts, Header h, int dboffset, const fnpyKey key);`

Notes:
- PR helps to solve issue: https://github.com/rpm-software-management/rpm/issues/1213
- better API function name name than `rpmtsAddEraseElement2` ?
- `dboffset` is still not used
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Add rpmtsAddEraseElement2 to API, extend rpmtsAddEraseElement with key data

-- File Changes --

    M lib/depends.c (15)
    M lib/rpmts.h (10)

-- Patch Links --

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

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1360
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200918/b449e8b7/attachment-0001.html>


More information about the Rpm-maint mailing list