Bug 1268181 - DNF exits with "Error: Repository _local is listed more than once in the configuration"
DNF exits with "Error: Repository _local is listed more than once in the conf...
Status: CLOSED DUPLICATE of bug 1237237
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
22
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-01 23:04 EDT by Mark Walker
Modified: 2015-10-13 09:45 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-13 09:45:58 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mark Walker 2015-10-01 23:04:07 EDT
Description of problem: DNF search and info actions continued to complain of local repository not function. Cannot reproduce exact message as DNF does not work at all at the moment. Current status is in the following example:
[root@<host> ~]# dnf clean all
Error: Repository _local is listed more than once in the configuration
[root@<host> ~]# 

Question: As a fix does not appear possible using the dnf command, is there a config or other file that may be edited externally to dnf to remove the problem? I would uninstall the plugins but dnf responds:
[root@<host> ~]# dnf erase *dnf-plugins-extras*
Error: Repository _local is listed more than once in the configuration
[root@<host> ~]# 

Version-Release number of selected component (if applicable): Fedora 22
Linux version 4.0.8-300.fc22.x86_64 (mockbuild@bkernel01.phx2.fedoraproject.org) (gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC) ) #1 SMP Fri Jul 10 21:04:56 UTC 2015

How reproducible:
Perform steps below.

Steps to Reproduce:
1. dnf -y install *dnf-plugins-extras*
2. Try any dnf command
3. No dnf command works, at all.

Actual results:
Response: Error: Repository _local is listed more than once in the configuration

Expected results:
dnf performs as designed.

Additional info:
Pertinent output of /var/log/dnf.log is as follows:
Oct 01 22:53:24 INFO --- logging initialized ---
Oct 01 22:53:24 DDEBUG timer: config: 7 ms
Oct 01 22:53:24 DEBUG cachedir: /var/cache/dnf
Oct 01 22:53:24 DEBUG Loaded plugins: debug, local, download, show-leaves, noroot, protected_packages, config-manager, tracer, leaves, kickstart, versionlock, Query, system-upgrade, snapper, migrate, needs-restarting, copr, playground, reposync, langpacks, debuginfo-install, repomanage, builddep, repoclosure, generate_completion_cache, repograph
Oct 01 22:53:24 DEBUG langpacks: No languages are enabled
Oct 01 22:53:24 DEBUG Adding en_US to language list
Oct 01 22:53:24 DEBUG Adding en to language list
Oct 01 22:53:24 DEBUG initialized Langpacks plugin
Oct 01 22:53:24 DEBUG DNF version: 1.1.1
Oct 01 22:53:24 DEBUG_2 Command: dnf clean all 
Oct 01 22:53:24 DEBUG_2 Installroot: /
Oct 01 22:53:24 DEBUG_2 Releasever: 22
Oct 01 22:53:24 DEBUG_2 Base command: clean
Oct 01 22:53:24 DEBUG_2 Extra commands: [u'all']
Oct 01 22:53:24 DEBUG_2 Cleaning up.
Oct 01 22:53:24 DEBUG_4 
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 117, in _main
    cli.configure(map(ucd, args))
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1034, in configure
    self.base.plugins.run_config()
  File "/usr/lib/python2.7/site-packages/dnf/plugin.py", line 82, in fn
    dnf.util.mapall(operator.methodcaller(method), self.plugins)
  File "/usr/lib/python2.7/site-packages/dnf/util.py", line 157, in mapall
    return list(map(fn, *seq))
  File "/usr/lib/python2.7/site-packages/dnf-plugins/local.py", line 104, in config
    self.base.repos.add(local_repo)
  File "/usr/lib/python2.7/site-packages/dnf/repodict.py", line 34, in add
    raise ConfigError(msg % id_)
ConfigError: Repository _local is listed more than once in the configuration
Oct 01 22:53:24 CRITICAL Error: Repository _local is listed more than once in the configuration
Comment 1 Mark Walker 2015-10-02 09:39:54 EDT
$ rpm -qa | grep dnf
python-dnf-plugins-extras-show-leaves-0.0.9-1.fc22.noarch
dnf-langpacks-0.15.1-1.fc22.noarch
dnf-1.1.1-2.fc22.noarch
dnf-yum-1.1.1-2.fc22.noarch
python-dnf-plugins-extras-debug-0.0.9-1.fc22.noarch
python-dnf-1.1.1-2.fc22.noarch
python3-dnf-plugins-extras-show-leaves-0.0.9-1.fc22.noarch
python3-dnf-plugins-extras-versionlock-0.0.9-1.fc22.noarch
python-dnf-plugins-extras-repoclosure-0.0.9-1.fc22.noarch
python-dnf-plugins-core-0.1.11-1.fc22.noarch
python2-dnf-plugin-system-upgrade-0.4.1-1.fc22.noarch
python3-dnf-plugins-extras-tracer-0.0.9-1.fc22.noarch
python-dnf-plugins-extras-common-0.0.9-1.fc22.noarch
python-dnf-plugins-extras-snapper-0.0.9-1.fc22.noarch
python-dnf-plugins-extras-leaves-0.0.9-1.fc22.noarch
python-dnf-plugins-extras-tracer-0.0.9-1.fc22.noarch
python3-dnf-plugins-extras-rpmconf-0.0.9-1.fc22.noarch
python-dnf-plugins-extras-repograph-0.0.9-1.fc22.noarch
python3-dnf-plugins-extras-repomanage-0.0.9-1.fc22.noarch
python-dnf-plugins-extras-local-0.0.9-1.fc22.noarch
dnf-plugins-core-0.1.11-1.fc22.noarch
python-dnf-plugins-extras-migrate-0.0.9-1.fc22.noarch
python-dnf-plugins-extras-versionlock-0.0.9-1.fc22.noarch
python3-dnf-plugins-extras-common-0.0.9-1.fc22.noarch
python3-dnf-plugins-extras-debug-0.0.9-1.fc22.noarch
dnf-conf-1.1.1-2.fc22.noarch
python3-dnf-1.1.1-2.fc22.noarch
dnf-plugin-system-upgrade-0.4.1-1.fc22.noarch
python3-dnf-plugins-extras-leaves-0.0.9-1.fc22.noarch
python3-dnf-plugins-extras-snapper-0.0.9-1.fc22.noarch
python3-dnf-plugins-extras-local-0.0.9-1.fc22.noarch
python3-dnf-plugins-extras-repograph-0.0.9-1.fc22.noarch
python-dnf-plugins-extras-repomanage-0.0.9-1.fc22.noarch
dnf-langpacks-conf-0.15.1-1.fc22.noarch
python3-dnf-plugins-extras-repoclosure-0.0.9-1.fc22.noarch
python-dnf-langpacks-0.15.1-1.fc22.noarch
Comment 2 Mark Walker 2015-10-03 17:30:02 EDT
Used the "find" command to locate repo files named _local, and it turns out there were several old artifacts from previous Fedora versions. I got this computer in 2013 and it has gone through the fedup process since Fedora 20. The offending file from the dnf perspective is /etc/yum.repos.d/_local.repo. I renamed it to not be a .repo file and things were back to "normal." That "normal" is full dnf functionality but dnf complains: "Failed to synchronize cache for repo '_local' from 'file:///var/lib/dnf/plugins/local': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried, disabling." That's a different problem from this, but I don't know if it's related.

So the fix (or workaround) to the problem this bug report was opened for appears to be rename (or delete) the /etc/yum.repos.d/_local.repo file.
Comment 3 Mark Walker 2015-10-03 17:41:14 EDT
Fixed, for me anyway: dnf -y erase python-dnf-plugins-extras-local
No more dnf problems.
Comment 4 Michal Luscon 2015-10-13 09:45:58 EDT

*** This bug has been marked as a duplicate of bug 1237237 ***

Note You need to log in before you can comment on or make changes to this bug.