Bug 1246211

Summary: DNF Repoquery: Automatically enable repo selected by --repo
Product: [Fedora] Fedora Reporter: Tomas 'Sheldon' Radej <tradej>
Component: dnf-plugins-coreAssignee: rpm-software-management
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: 23CC: jmracek, jsilhan, jzeleny, mluscon, packaging-team-maint, pnemade, tim.lauridsen, 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 19:13:41 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 'Sheldon' Radej 2015-07-23 17:29:46 UTC
Description of problem:
When the repo FOO in 

    dnf repoquery --repo FOO

is not enabled, an empty result is returned. It is necessary to enable the repo manually:

    dnf repoquery --enablerepo FOO --repo FOO

Even though this behaviour is technically correct, I believe it would be logical and user friendly to automatically enable repos selected by --repo.

Version-Release number of selected component (if applicable):
dnf-plugins-core-0.1.9-1.fc23.noarch

How reproducible:
Always

Steps to Reproduce:
1. Disable a repository (FOO)
2. $ dnf repoquery --repo FOO

Actual results:
Empty result

Expected results:
Listing of all packages in the repo FOO

Comment 1 Radek Holy 2015-07-24 08:32:27 UTC
...or we should at least print a warning.

FTR, I remember that we intentionally did not introduce this behaviour when implementing "dnf repo-pkgs". So, if we are going to implement this, it would be nice to make it consistent among all DNF commands.

Comment 2 Honza Silhan 2015-08-10 12:46:46 UTC
Right, t should enable the specified repo. The same for "repo-pkgs".

Comment 3 Honza Silhan 2015-08-10 12:48:01 UTC
With this change we can transfer this switch to DNF.

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

Comment 5 Jaroslav Mracek 2016-09-20 12:54:43 UTC
The bug reported here is fixed in upstream (dnf-2.0), but problem mentioned in Comment 2 is solved by PR: https://github.com/rpm-software-management/dnf/pull/615