[Rpm-maint] [rpm-software-management/rpm] Implement a database cookie API for determining whether rpmdb has cha… (#712)
Panu Matilainen
notifications at github.com
Thu May 23 10:33:24 UTC 2019
…nged
Add rpmdbCookie() public function and matching python bindings.
The returned value is an opaque string which changes any time the rpmdb
is changed (eg packages added or removed, rebuild changes things etc).
A key point is that this is entirely database backend agnostic.
The actual implementation here is an SHA1 hash of RPMDBI_NAME keys,
but this is an implementation detail that can be changed anytime and
callers must not rely on. The only thing that matters is whether the
string equals an earlier cookie value or not. A cryptographic hash
seems like an overkill, but then it saves us the headaches of coming
up with something that reflects order changes etc.
Closes: #388
You can view, comment on, or merge this pull request online at:
https://github.com/rpm-software-management/rpm/pull/712
-- Commit Summary --
* Implement a database cookie API for determining whether rpmdb has changed
-- File Changes --
M lib/rpmdb.c (16)
M lib/rpmdb.h (8)
M python/rpmts-py.c (18)
M tests/rpmpython.at (50)
-- Patch Links --
https://github.com/rpm-software-management/rpm/pull/712.patch
https://github.com/rpm-software-management/rpm/pull/712.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/712
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190523/7443c6fd/attachment.html>
More information about the Rpm-maint
mailing list