Bug 1391917

Summary: dnf --enablerepo= doesn't see source repositories?
Product: [Fedora] Fedora Reporter: Pavel Raiskup <praiskup>
Component: dnfAssignee: Michael Mráka <mmraka>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: high    
Version: rawhideCC: jsilhan, mluscon, mmraka, packaging-team-maint, pnemade, praiskup, rpm-software-management, vmukhame
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-11 10:31:35 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:

Description Pavel Raiskup 2016-11-04 11:19:19 UTC
Running fedora-rawhide-x86_64 mock on F24 box does:

  <mock-chroot> sh-4.3# dnf search --enablerepo='*source' test
  Error: Unknown repo: '*source'

While:

  <mock-chroot> sh-4.3# grep -r source\\] /etc/yum.repos.d/
  /etc/yum.repos.d/fedora-rawhide.repo:[rawhide-source]
  /etc/yum.repos.d/fedora-updates-testing.repo:[updates-testing-source]
  /etc/yum.repos.d/fedora-updates.repo:[updates-source]
  /etc/yum.repos.d/fedora.repo:[fedora-source]

Works for me on native F24 box.

Comment 1 Honza Silhan 2016-11-07 12:17:26 UTC
It looks like regression in DNF-2.0. We will fix it.

Comment 2 Michael Mráka 2016-11-11 10:31:35 UTC
I can't reproduce the issue:

#  dnf search --enablerepo='*source' test
Last metadata expiration check: 0:00:11 ago on Fri Nov 11 11:27:43 2016 CET.
=========================================== N/S Matched: test ============================================
sisu-tests.noarch : Sisu tests
NFStest.noarch : NFS Testing Tool
xsp-tests.x86_64 : xsp test files
NFStest.src : NFS Testing Tool
cogl-tests.x86_64 : Tests for cogl
eclipse-tests.x86_64 : Eclipse Tests
...

# rpm -q dnf
dnf-2.0.0-0.rc1.4.fc26.noarch


Closing. Feel free to reopen with new information if the problem still persists.

Comment 3 Pavel Raiskup 2016-11-11 11:19:01 UTC
$ mock -r fedora-rawhide-x86_64 --install dnf
$ mock -r fedora-rawhide-x86_64 --shell
<mock-chroot> sh-4.3# dnf search --enablerepo='*source' test
Error: Unknown repo: '*source'
<mock-chroot> sh-4.3# grep -r source\\] /etc/yum.repos.d/
/etc/yum.repos.d/fedora-rawhide.repo:[rawhide-source]
/etc/yum.repos.d/fedora-updates-testing.repo:[updates-testing-source]
/etc/yum.repos.d/fedora-updates.repo:[updates-source]
/etc/yum.repos.d/fedora.repo:[fedora-source]
<mock-chroot> sh-4.3# rpm -q dnf fedora-repos
dnf-2.0.0-0.rc1.4.fc26.noarch
fedora-repos-26-0.3.noarch

Comment 4 Pavel Raiskup 2016-11-11 12:02:46 UTC
Michael, have you tried this ^, I admit I might be user error, but I'm rather
setting needinfo to not miss something.

Comment 5 Michael Mráka 2016-11-11 12:30:58 UTC
This is a mock (mis)configuration. See /etc/dnf/dnf.conf in mock root:

[main]
...
reposdir=/dev/null
...
[fedora]
...
[local]
...
[debug]
...


So it does not read repo definitions from /etc/yum.repos.d/.

Comment 6 Pavel Raiskup 2016-11-11 12:35:55 UTC
Truth, thank you!