Bug 110226
Summary: | [RFE] [rpm-python] hdrobject[rpm.RPMTAG_REQUIREFLAGS] should always return a list object | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Paul Nasrat <nobody+pnasrat> | ||||
Component: | rpm | Assignee: | Jeff Johnson <jbj> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Mike McLean <mikem> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 1 | CC: | herrold, pmatilai | ||||
Target Milestone: | --- | Keywords: | FutureFeature | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
URL: | https://lists.dulug.duke.edu/pipermail/rpm-python-list/2003-October/000012.html | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Enhancement | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2003-12-30 15:47:29 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Paul Nasrat
2003-11-17 10:03:21 UTC
Ready, willing and able whenever. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I hardly qualify as "a major user" but here's my humble +1 for this change anyway, would make life just that little bit easier with rpm-python. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQE/uM2ula5U8jydsKoRAgVkAJwI1zcu61ncU/0rtw8AKsnMsaijLwCgh/6o LUtxpVQ+2lUGPQ1Yh5lefXE= =6pzO -----END PGP SIGNATURE----- this should be the same for requires,provides, conflicts and obsoletes. Hell in general everything that can return a list object should always return a list object, even when it is empty. I do not have sign off from alikins, sopwith, nor katzj, and hence cannot make the change. Possibly timp needs ack too. Reopen if/when necessary signoff is acquired. I concur with Seth's comment (#3). The same object should be returned regardless of length. If it's going to return a list of ints, it should always be a list of ints (even if there's nothing to return, return an empty list), if it can return a list of strings, it should always return a list...as so on. Yes, if the tag normally is a list but has zero elements in the header, return an empty list. I don't hvae any problem with this that I can think of. sure Wheee, consensus! Created attachment 96720 [details] Simple unit test This is fixed in HEAD and rpm-4_2 and in rpm-4.2.2-0.8 python >>> import rpm >>> ts=rpm.TransactionSet() >>> hdr=ts.dbMatch("Name","rpm").next() >>> hdr[rpm.RPMTAG_OBSOLETEFLAGS] [2] python test_obs.py ... ---------------------------------------------------------------------- Ran 3 tests in 0.060s OK |