Bug 1327438

Summary: make --available default in dnf repoquery
Product: [Fedora] Fedora Reporter: Tomas Mlcoch <tmlcoch>
Component: dnfAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: jmracek, jsilhan, mluscon, packaging-team-maint, pnemade, vmukhame
Target Milestone: ---Keywords: EasyFix, 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-10-04 18:08:02 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 Tomas Mlcoch 2016-04-15 07:28:18 UTC
I have a repository "/path/to/repo/" with 3 packages, but when I run:

$ REPOID="160415-6" && dnf repoquery --repofrompath="$REPOID,file:///path/to/repo/" --disablerepo='*' --enablerepo="$REPOID" '*'

I get gazillion of packages.

Yum based repoquery works as expected:

$ REPOID="160415-6" && repoquery --repofrompath="$REPOID,file:///home/tmlcoch/git/createrepo_c/rpms_1/" --disablerepo='*' --enablerepo="$REPOID" '*'


My configuration:

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

$ rpm -q dnf hawkey libsolv librepo python-hawkey python-librepo
dnf-1.1.8-1.fc23.noarch
hawkey-0.6.2-3.fc23.x86_64
libsolv-0.6.19-2.fc23.x86_64
librepo-1.7.16-2.fc23.x86_64
python-hawkey-0.6.2-3.fc23.x86_64
python-librepo-1.7.16-2.fc23.x86_64

Comment 1 Honza Silhan 2016-04-18 12:02:05 UTC
We should consider how to make included available and installed by some options.

Comment 2 Jaroslav Mracek 2016-05-06 08:45:45 UTC
Repoquery from yum-utils shows only available package with higher version. ``yum info`` installed and only available package with higher version (install only packages works differently). 
We want that?:
1. ``dnf repoquery`` should show all available packages
2. ``dnf repoquery --installed`` only installed
3. ``dnf repoquery --installed --available`` all packages (this is at present time unsupported combination)

Or it should behave exactly like repoquery (same options, behavior)?

Here are some examples of yum - dnf compatibility:

repoquery --show-duplicates '*' = dnf repoquery --available

repoquery '*' = dnf repoquery --latest-limit=1 --available

The question is, if it is worth to change dnf repoquery behavior if same thing can be done by compatible layer for users, that like yum behavior, or by ``dnf repoquery`` options?

Comment 3 Jaroslav Mracek 2016-05-09 14:29:40 UTC
A made a pull-request that will allow --available as a default option:
https://github.com/rpm-software-management/dnf-plugins-core/pull/163