Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1225661 - DNF isn't picking the package with the highest NVR when 'best' is set
Summary: DNF isn't picking the package with the highest NVR when 'best' is set
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-27 23:12 UTC by Brian Lane
Modified: 2016-07-19 14:18 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-19 14:18:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
test-dnf-transaction script (deleted)
2015-05-27 23:13 UTC, Brian Lane
no flags Details

Description Brian Lane 2015-05-27 23:12:23 UTC
I am trying to use lorax to build a test boot.iso with a newer anaconda build. When I point it to the F22 repository and my local repo with a newer anaconda DNF is not picking the package with the higher NVR.

If I point it to the F22 and rawhide repos it picks the one from rawhide, so my guess is that with my local repo there are some deps still missing and it falls back to the one with the complete set of dependencies instead of stopping with an error.

Attached is a script that can demonstrate the problem. Copy a newer version of anaconda (23.8 from rawhide is what I used in my test) into a side repo, run createrepo on it and run:

test-dnf-transaction -r 22 -s http://dl.fedoraproject.org/pub/fedora/linux/releases/22/Everything/x86_64/os/ -s http://url-of-side-repo/ anaconda |& tee package-list.txt

Is it possible to get DNF to choose the one I want, and if it won't work exit with an error?

Comment 1 Brian Lane 2015-05-27 23:13:11 UTC
Created attachment 1030844 [details]
test-dnf-transaction script

Comment 2 Jan Zeleny 2015-05-28 07:57:43 UTC

*** This bug has been marked as a duplicate of bug 1225725 ***

Comment 3 Radek Holy 2015-05-28 10:05:02 UTC
(In reply to Brian Lane from comment #0)
> Is it possible to get DNF to choose the one I want, and if it won't work
> exit with an error?

If the package has a unique version, specify the version (e.g. "anaconda-23.8"), if the package is in a unique repository, specify the repository (e.g. "dnf repository-packages REPO install anaconda"; using API, you need to query the package "base.sack.query().filter(reponame=REPO)" and install it "base.package_install(pkg)").

Comment 4 Brian Lane 2015-05-28 16:00:26 UTC
Well the point is to not have to specify the NVR. We give lorax a list of repos and DNF should pick the best packages or raise an error if the dependencies of the highest NVR packages cannot be met.

As an update, I've added conf.best = True to my config setup in the attached script, expecting that it would at least raise an error that the deps for the newer anaconda version were unresolved, but it does not. It still picks the older version.

I'm unduping this since I don't think it is the same issue. In those other bugs they are having dependency problems that can't be resolved at all. In this case there is a resolution, it's just the wrong one. I want to see it complain that anaconda-23.xxx can't be installed instead of it picking anaconda-22.xxx which has complete deps.

Comment 5 Jan Zeleny 2015-05-29 06:12:43 UTC
(In reply to Brian Lane from comment #4)
> Well the point is to not have to specify the NVR. We give lorax a list of
> repos and DNF should pick the best packages or raise an error if the
> dependencies of the highest NVR packages cannot be met.
> 
> As an update, I've added conf.best = True to my config setup in the attached
> script, expecting that it would at least raise an error that the deps for
> the newer anaconda version were unresolved, but it does not. It still picks
> the older version.
> 
> I'm unduping this since I don't think it is the same issue. In those other
> bugs they are having dependency problems that can't be resolved at all. In
> this case there is a resolution, it's just the wrong one. I want to see it
> complain that anaconda-23.xxx can't be installed instead of it picking
> anaconda-22.xxx which has complete deps.

I'm sorry but I have hard time seeing how this is different than bug 1225725. If you re-read your last sentence, you will see that the problem is exactly the same. Or am I missing something? Reading back the second paragraph of your response, maybe that's what you want this bug report to be about? (the conf.best option behavior)

Comment 6 Brian Lane 2015-05-29 15:57:46 UTC
bug 1225725 is about it reporting an error. This bug is about it *not* reporting an error and choosing the package that isn't the higest NVR even when best=True is used.

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

Comment 8 Fedora End Of Life 2016-07-19 14:18:02 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 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.


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