Bug 991329 - make hdr[1051] (RPMTAG_NOSOURCE) format consistent
make hdr[1051] (RPMTAG_NOSOURCE) format consistent
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
20
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
: Upstream
Depends On:
Blocks: 578256
  Show dependency treegraph
 
Reported: 2013-08-02 03:27 EDT by Daniel Mach
Modified: 2014-04-08 21:00 EDT (History)
7 users (show)

See Also:
Fixed In Version: rpm-4.11.2-1.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-20 08:56:38 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daniel Mach 2013-08-02 03:27:43 EDT
RPMTAG_NOSOURCE and RPMTAG_NOPATCH should always be a list - either empty or with list of relevant source/patch numbers

Current result:

src:
hdr[1051] = []

nosrc #1:
Source0: ...
NoSource: 0
hdr[1051] = 0

nosrc #2:
Source0: ...
Source1: ...
NoSource: 0
NoSource: 1
hdr[1051] = [0, 1]


Expected result:
hdr[1051] in nosrc #1 should be [0] instead of 0.
Comment 2 Fedora End Of Life 2013-09-16 12:49:22 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20
Comment 3 Daniel Mach 2013-10-09 04:19:02 EDT
Panu, is this usage correct?

Source0:        source0
Source1:        source1

Patch0:         patch0
Patch1:         patch1

NoSource:       0
NoSource:       1

NoPatch:        0
NoPatch:        1

this is what I get when I read the headers:
print header[rpm.RPMTAG_NOSOURCE]
print header[rpm.RPMTAG_NOPATCH]

->
0
0

Expected result:
[0, 1]
[0, 1]
Comment 4 Panu Matilainen 2013-10-09 08:20:01 EDT
The expected result is what you get with the fix in place, but its not in Fedora yet.

The header actually contains [0, 1] for both tags in this case, but the python bindings never return an array unless the tag is explicitly marked as an array type, just like a tag marked as array always returns an array regardless of the number of entries.
Comment 5 Panu Matilainen 2014-01-20 08:56:38 EST
Fixed in rawhide now as of rpm >= 4.11.2, F20 (and F19) will be rebased to this version too once its gotten sufficient testing.
Comment 6 Fedora Update System 2014-02-13 04:02:17 EST
rpm-4.11.2-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/rpm-4.11.2-1.fc20
Comment 7 Fedora Update System 2014-02-13 04:44:03 EST
rpm-4.11.2-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/rpm-4.11.2-1.fc19
Comment 8 Fedora Update System 2014-02-16 18:22:10 EST
rpm-4.11.2-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Fedora Update System 2014-04-08 21:00:41 EDT
rpm-4.11.2-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

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