Bug 1266904

Summary: [rfe] equivalent of yumdownloader --urls
Product: [Fedora] Fedora Reporter: Ed Avis <eda>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: jsilhan, jzeleny, mluscon, packaging-team-maint, pnemade, tim.lauridsen, vmukhame
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: 2015-10-13 13:30:32 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:

Description Ed Avis 2015-09-28 13:05:17 UTC
The equivalent of yumdownloader is 'dnf download', but it doesn't support the --urls flag to just print out the URIs instead of downloading them.  I use this to check a local package list against the upstream packages, to see whether a newer or older upstream equivalent exists.  I don't want to actually download the upstream package, just look at its name.

Perhaps there is a better way to do that than getting the URI and parsing it for a version number, but generally this is a missing feature that's a regression from yum, and straightforward to provide (dnf download already knows what the URIs are, so it just needs to print them and exit).

Would you accept a patch to add a --urls flag?

Comment 1 Michal Luscon 2015-10-13 13:30:32 UTC
Hi Ed,

the situation with --url option is a bit more complicated than you probably expect. DNF actually does not know the URIs as the whole download process is handled by librepo library.

If you wan to still contribute a patch, I would advice you to contact the librepo developers first with an RFE describing your use case, and feel free to reopen this report after the implementation of necessary bits in librepo.

Comment 2 Ed Avis 2015-10-13 13:51:34 UTC
Thanks for your reply.  For my use case it is not necessary to see the URIs - I just filed the bug because I assumed they were easy to get.  But really what I would like to see is the version and release for the package of a particular name in the repo.  For example

% dnf repo-query bash
bash-4.3.42-1.fc22.x86_64

So a bit like 'rpm -q' but reporting what is available in the repo rather than what is installed.  Is there a dnf command which does that?