Bug 1229730

Summary: dnf.subject.Subject() does not honour epoch
Product: [Fedora] Fedora Reporter: Michael Mráka <mmraka>
Component: dnfAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: gerd, jmracek, jsilhan, jzeleny, mluscon, packaging-team-maint, pnemade, tim.lauridsen, vmukhame
Target Milestone: ---Keywords: Triaged
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-02 15:17:04 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:
Bug Depends On:    
Bug Blocks: 1286877    

Description Michael Mráka 2015-06-09 14:08:43 UTC
Description of problem:
dnf.subject.Subject() returns packages with different epochs even if epoch is specified

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

How reproducible:
always

Steps to Reproduce:
1. have a repo with two packages of the same name and different epoch, e.g
   foo-0:1.0-1.fc22.noarch.rpm and foo-1:1.0-1.fc22.noarch.rpm
2. dnf list foo-0:1.0-1.fc22


Actual results:
# dnf list foo-0:1.0-1.fc22
Available Packages
foo.noarch               1.0-1.fc22      foo
foo.noarch               1:1.0-1.fc22    foo   

Expected results:
# dnf list foo-0:1.0-1.fc22
Available Packages
foo.noarch               1.0-1.fc22      foo


Additional info:
-> subj = dnf.subject.Subject('foo-0:1.0-1.fc22')
-> pkgs = subj.get_best_query(self.base.sack)
(Pdb) pkgs.run()
[<hawkey.Package object id 46019, foo-1.0-1.fc22.noarch, foo>, <hawkey.Package object id 46020, foo-1:1.0-1.fc22.noarch, foo>]

Comment 1 Jan Kurik 2015-07-15 14:02:34 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

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

Comment 2 Honza Silhan 2015-07-24 12:13:55 UTC
IIRC we have the bug report not recognizing the package with epoch in install cmd (can't find the bug now). This is the cause.

Comment 3 Fedora Admin XMLRPC Client 2016-07-08 09:34:54 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Fedora End Of Life 2016-11-24 11:52:34 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 Michael Mráka 2016-11-24 13:03:18 UTC
Jarda, has this bug been fixed with the latest Subject/Selector changes?

Comment 6 Jaroslav Mracek 2016-11-25 14:33:51 UTC
Michael sorry, but latest selectors changes did not solve the issue, but this PR YEEEES: https://github.com/rpm-software-management/dnf/pull/662