forked from rpm-software-management/rpm
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement a database cookie API for determining whether rpmdb has cha…
…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: rpm-software-management#388
- Loading branch information
Showing
4 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters