Bug 110226 - [RFE] [rpm-python] hdrobject[rpm.RPMTAG_REQUIREFLAGS] should always return a list object
Summary: [RFE] [rpm-python] hdrobject[rpm.RPMTAG_REQUIREFLAGS] should always return a ...
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm   
(Show other bugs)
Version: 1
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL: https://lists.dulug.duke.edu/pipermai...
Keywords: FutureFeature
Depends On:
TreeView+ depends on / blocked
Reported: 2003-11-17 10:03 UTC by Paul Nasrat
Modified: 2014-01-21 22:48 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-12-30 15:47:29 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Simple unit test (795 bytes, text/plain)
2003-12-29 12:16 UTC, Paul Nasrat
no flags Details

Description Paul Nasrat 2003-11-17 10:03:21 UTC
Description of problem:

As requested in your email to the list this is a tracker bug for the
RFE to change the behaviour or this to always return a list.  I will
poke the key rpm-python api users to add a comment signing off this

Version-Release number of selected component (if applicable):


How reproducible:


Comment 1 Jeff Johnson 2003-11-17 11:10:38 UTC
Ready, willing and able whenever.

Comment 2 Panu Matilainen 2003-11-17 13:30:57 UTC
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.
Version: GnuPG v1.2.3 (GNU/Linux)

Comment 3 Seth Vidal 2003-11-17 13:54:12 UTC
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.

Comment 4 Ville Skyttä 2003-11-25 21:57:13 UTC
+1 to lists and comment 3.

Comment 5 Jeff Johnson 2003-12-18 12:11:38 UTC
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.

Comment 6 Tim Powers 2003-12-18 13:38:21 UTC
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.

Comment 7 Elliot Lee 2003-12-18 13:52:16 UTC
Yes, if the tag normally is a list but has zero elements in the
header,  return an empty list.

Comment 8 Jeremy Katz 2003-12-18 15:42:15 UTC
I don't hvae any problem with this that I can think of.

Comment 9 Adrian Likins 2003-12-18 18:27:13 UTC

Comment 10 Jeff Johnson 2003-12-18 18:55:54 UTC
Wheee, consensus!

Comment 11 Paul Nasrat 2003-12-29 12:16:12 UTC
Created attachment 96720 [details]
Simple unit test

This is fixed in HEAD and rpm-4_2 and in rpm-4.2.2-0.8

>>> import rpm
>>> ts=rpm.TransactionSet()
>>> hdr=ts.dbMatch("Name","rpm").next()

python test_obs.py
Ran 3 tests in 0.060s

Note You need to log in before you can comment on or make changes to this bug.