Bug 1286477

Summary: DNF creates /etc/yum/repos.d instead of /etc/dnf/repos.d when no repodir is present/configured
Product: [Fedora] Fedora Reporter: Neal Gompa <ngompa13>
Component: dnf-plugins-coreAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: jmracek, jsilhan, mdomonko, mluscon, packaging-team-maint, pnemade, RadekHolyPublic, vmukhame
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-plugins-core-0.1.17-1.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-26 17:58:25 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 Neal Gompa 2015-11-29 22:13:45 UTC
Description of problem:
I've been testing DNF on Mageia as part of my work to bring up DNF for Mageia 6, and I've been testing various cases. One rather interesting case is that if you use something like dnf config-manager --add-repo <URL> to add a .repo file, or if you use dnf copr to add a copr repo, it will create /etc/yum/repos.d if it doesn't exist or if /etc/yum.repos.d doesn't exist.

This issue is reproducible on Fedora systems if you're willing to temporarily rename the /etc/yum.repos.d folder.

Version-Release number of selected component (if applicable):
dnf 1.1.3-2.mga6 / dnf-plugins-core 0.1.13-3.mga6

dnf 1.1.4-1.fc23 / dnf-plugins-core 0.1.14-1.fc23

How reproducible:
Always

Steps to Reproduce (Fedora):
1. Rename /etc/yum.repos.d to something else
2. Use dnf copr enable or dnf config-manager --add-repo <URL>

Actual results:
/etc/yum/repos.d folder is created and repo file is inserted there.

Expected results:
/etc/dnf/repos.d folder is created and repo file is inserted there.

Additional info:
Of course, if /etc/yum.repos.d or /etc/yum/repos.d already exists and has stuff there, it should use them.


Additional query:
I'm not quite sure where I want to put repodata in Mageia yet. I think I like the idea that Fedora uses /etc/yum.repos.d, which is outside of the normal folder structure and can be cleanly maintained by a separate package. However, I think it would make sense to call it /etc/dnf.repos.d, but that's not supported in DNF currently, or at least I don't see any documentation that indicates that it is.

Comment 1 Jaroslav Mracek 2015-12-10 13:45:41 UTC
New pull-request that will change this behavior was made. Thank you for reporting.

Comment 2 Jaroslav Mracek 2015-12-17 13:57:56 UTC
Pull-request: https://github.com/rpm-software-management/dnf/pull/406

Comment 3 Jan Kurik 2016-02-24 14:03:41 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 4 Fedora Update System 2016-02-25 13:53:44 UTC
dnf-plugins-core-0.1.17-1.fc23 dnf-1.1.7-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-0123ce82c1

Comment 5 Fedora Update System 2016-02-25 13:56:31 UTC
dnf-plugins-core-0.1.17-1.fc22 dnf-1.1.7-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f673381075

Comment 6 Fedora Update System 2016-03-09 17:19:56 UTC
dnf-1.1.7-2.fc23 dnf-plugins-core-0.1.17-1.fc23 libsolv-0.6.19-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-0123ce82c1

Comment 7 Fedora Update System 2016-03-09 17:21:44 UTC
dnf-1.1.7-2.fc22 dnf-plugins-core-0.1.17-1.fc22 libsolv-0.6.19-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f673381075

Comment 8 Fedora Update System 2016-03-10 16:53:07 UTC
dnf-1.1.7-2.fc22, dnf-plugins-core-0.1.17-1.fc22, libsolv-0.6.19-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-f673381075

Comment 9 Fedora Update System 2016-03-10 16:54:42 UTC
dnf-1.1.7-2.fc23, dnf-plugins-core-0.1.17-1.fc23, libsolv-0.6.19-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-0123ce82c1

Comment 10 Fedora Update System 2016-03-13 23:55:06 UTC
dnf-1.1.7-2.fc23, dnf-plugins-core-0.1.17-1.fc23, libsolv-0.6.19-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2016-03-19 12:16:14 UTC
dnf-1.1.7-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-c030d24231

Comment 12 Fedora Update System 2016-03-20 03:58:03 UTC
dnf-1.1.7-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-c030d24231

Comment 13 Fedora Update System 2016-03-26 17:57:52 UTC
dnf-1.1.7-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.