[Rpm-maint] [rpm-software-management/rpm] "ts.check" function return values different from the documents (Issue #1871)

marsCat notifications at github.com
Thu Dec 23 13:31:46 UTC 2021


I'm currently working on a GUI rpm software manager, it uses rpm python APIs to work. And I read the 16th chapter in 'fedora rpm guide'  as the api document.
When I try to check package's( I know this package lacks the dependencies, doing this for a test ) dependencies with ts.check() function,  the function returns tuples different from the document.
For example, I'm using fedora 34 and I tried to install 'qtbase 5.9' package from centos7, the function returns:
```
[(('qt5-qtbase', '5.9.7', '4.el7'), ('libcrypto.so.10()(64bit)', ''), 0, 0, None), 
(('qt5-qtbase', '5.9.7', '4.el7'), ('libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit)', ''), 0, 0, None), 
(('qt5-qtbase', '5.9.7', '4.el7'), ('libcrypto.so.10(OPENSSL_1.0.2)(64bit)', ''), 0, 0, None) .....]
```
The 2nd, 3rd value in tuple seems like enums, and the 4th value is something else I don't know. The document says it supposed to be like:
`((N,V,R), (reqN, reqV), needsFlags, suggestedPackage, sense)`
I don't think they are the same thing, I guess there maybe something wrong in order.

And, the doc says "You can tell whether the dependency is a conflict or a requirement based on the sense value, one of
rpm.RPMSENSE_CONFLICTS or rpm.RPMSENSE_REQUIRES."  I didn't find the mentioned enum RPMSENSE_CONFLICTS and RPMSENSE_REQUIRES, and they are not exist in present rpm code, but they still exists in [this comment](https://github.com/rpm-software-management/rpm/blob/master/python/rpmts-py.c#L91)

Thanks for help first.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1871
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/1871 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20211223/5ae503d8/attachment.html>


More information about the Rpm-maint mailing list