Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 154657 - Yum always (and only) looks for the fedora.repo file
Summary: Yum always (and only) looks for the fedora.repo file
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-04-13 12:41 UTC by Paolo Campegiani
Modified: 2014-01-21 22:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-04-14 12:09:35 UTC


Attachments (Terms of Use)

Description Paolo Campegiani 2005-04-13 12:41:44 UTC
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 14:38:59 UTC
Try naming your repo file yoda.repo instead of yoda.

Comment 2 Paolo Campegiani 2005-04-13 15:48:54 UTC
> 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 17:41:20 UTC
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 08:14:30 UTC
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 12:08:38 UTC
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.