Bug 1117773

Summary: rpmUtils.miscutils.splitFilename fails to parse NEVRA format
Product: [Fedora] Fedora Reporter: Ales Zelinka <azelinka>
Component: yumAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 23CC: admiller, marseille07, packaging-team-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-20 12:49:14 UTC Type: Bug
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 Flags
patch with fix none

Description Ales Zelinka 2014-07-09 11:30:46 UTC
The splitFilename fails if epoch is used like this:

name-epoch:version-release.arch (NEVRA)

instead of 

epoch:name-version-release.arch (ENVRA).

I can't find any authoritative source on which format is correct but NEVRA is the most used format in Bugzilla's Fixed-in field and the default for repoquery.

yum-3.4.3-152.fc20.noarch
>>> print rpmUtils.miscutils.splitFilename('name-1:2-3.i386')
('', '1:2', '3', 'name-1', 'i386')
>>> print rpmUtils.miscutils.splitFilename('1:name-2-3.i386')
('name', '2', '3', '1', 'i386')

Comment 1 Ales Zelinka 2014-07-09 14:38:35 UTC
Created attachment 916819 [details]
patch with fix

Comment 2 Jaroslav Reznik 2015-03-03 16:07:15 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 3 Satoshi Yagi 2015-12-27 04:12:30 UTC
Hi,

I'm on Fedora 23 and this bug is still present.

$ cat /etc/redhat-release
Fedora release 23 (Twenty Three)

$ rpm -qf /usr/lib/python2.7/site-packages/rpmUtils/miscutils.py
yum-3.4.3-507.fc23.noarch

If this had been reported on Fedora 22 rawhide, why hasn't it been fixed in either Fedora 22 or 23?  The patch provided by Ales seems to work, so it's just a matter of applying it.

This is an annoying bug, because rpm treats NVR or NEVRA as standard formats, whereas yum primarily uses ENVRA.  Given that this python library is part of yum package, my suspicion is that the author tried to parse ENVRA and overlooked to account for NEVRA.

Comment 4 Fedora End Of Life 2016-11-24 11:11:15 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Fedora End Of Life 2016-12-20 12:49:14 UTC
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.