Bug 154657 - Yum always (and only) looks for the fedora.repo file
Yum always (and only) looks for the fedora.repo file
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-13 08:41 EDT by Paolo Campegiani
Modified: 2014-01-21 17:51 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-14 08:09:35 EDT
Type: ---
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 Paolo Campegiani 2005-04-13 08:41:44 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050323 Firefox/1.0.2 Fedora/1.0.2-1.3.1

Description of problem:
Due to this bug you won't be able to define an organizational-wide, private mirror or Fedora Core 3.

Basically, yum doesn't consider files in /etc/yum.repos.d to be equal. It has some (wrong) assumptions over /etc/yum.repos.d/fedora.repo

I changed all the enabled=1 lines for the files in /etc/yum.repos.d with enabled=0, and I added a private repository:

cat /etc/yum.repos.d/yoda
[base]
name=Private mirror of Fedora Core
baseurl=http://10.2.3.60/Fedora/RPMS
enabled=1
gpgcheck=0

what I should have expected is yum using this mirror, ignoring the others. Instead, I got this message:

Config Error: Insufficient repository configuration. No repositories Found/Enabled. Aborting.
Repository base already added, not adding again

strace the program very quickly shows that yum tries to fetch something from download.fedora.com, using the *disabled* fedora.repo config file, and then probably after recognizing that is really disabled stops.



Version-Release number of selected component (if applicable):
yum-2.1.11-3

How reproducible:
Always

Steps to Reproduce:
1. Install Fedora Core 3 (minimal installation is ok)
2. Install an updated version of yum (via rpm)
3. for each file in /etc/yum.repos.d, rewrite enabled=1 as enabled=0
4. Build a mirror or Fedora Core 3 (the base system is sufficient)
5. Describe this mirror in /etc/yum.repos.d/mirror.repo (filename not relevant)
5. yum install emacs   fails


Actual Results:  Unable to install anything from the mirror. yum says:

Config Error: Insufficient repository configuration. No repositories Found/Enabled. Aborting.
Repository base already added, not adding again


Analyzing the log from the mirror shows that there is no connection attempt at all. strace you show that yum tries to access something from download.redhat.com

Expected Results:  Yum using a private mirror or Fedora Core 3

Additional info:

The solution to the problem is easy:

mv /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora.repo.orig
ln -s /etc/yum.repos.d/mirror.repo /etc/yum.repos.d/fedora.repo

doing this I'm able to use mirror.repo as my private mirror of Fedora Core 3.

(of course there are other solutions, included playing with /etc/hosts)

I define this as a bug as nowhere in the documentation of yum is declared that fedora.repo is a hard-coded filename (or, in some ways, that this file is more important than the others, with a different semantics, ...). 

Also, it seems strange to me that yum, with at least 1 no-disabled repository, refuses to use it because fedora.repo is disabled.

If you don't put in place the suggested workaround, you won't be able to define a private mirror of Fedora Core 3. It seems to me that this limits the scalability of the update system.
Comment 1 Sean Dilda 2005-04-13 10:38:59 EDT
Try naming your repo file yoda.repo instead of yoda.
Comment 2 Paolo Campegiani 2005-04-13 11:48:54 EDT
> Try naming your repo file yoda.repo instead of yoda.

the repo file is named yoda.repo (I made a mistake in filling the bug reporting
form):

# grep enabled *
fedora-devel.repo:enabled=0
fedora.repo:enabled=0
fedora-updates.repo:enabled=0
fedora-updates-testing.repo:enabled=0
yoda.repo:enabled=1
# yum install emacs
Error: Bad repository file ///etc/yum.repos.d/yoda.repo. Skipping
Config Error: Insufficient repository configuration. No repositories
Found/Enabled. Aborting.
Comment 3 Seth Vidal 2005-04-13 13:41:20 EDT
okay.
1. update to a newer yum 2.2.0 is in updates - get that
2. make sure you don't have two repositories named the same thing - if yoda.repo
has a [base] repo - then things aren't going to work.
Comment 4 Paolo Campegiani 2005-04-14 04:14:30 EDT
Point 2. solves the problem. It'd be better if yum complains about duplicated
sections (and missing sections names, the same problem appears if yoda.repo has
not a section name).

close.
Comment 5 Seth Vidal 2005-04-14 08:08:38 EDT
If you update to 2.2.0 - I'm pretty sure the error message does tell you that.

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