Completely using an alternate yum
configuration
As part of automatic installs of Fedora Core, our customization step
installs of the current Red Hat updates from a local mirror. We use
yum
for this, because it both handles dependencies and uses compact
metadata files instead of having to read all of the update and base OS
RPMs themselves. (We have 100 megabit networks, but it still adds up
and slows down installs.)
We do this by feeding yum
a custom configuration file; basically we
take the standard /etc/yum.conf
file and add some bits to point to
our on-disk repositories. (In turn, this means I get to explore the
many charms and wonders of building yum
metadata. Which deserves an
entry itself.)
This mostly works, but with Fedora Core 4 this step started bitching
about 'ignoring duplicate entry for <repository type>'. Since it
worked, I ignored it. As part of diagnosing the install failure
yesterday, this escalated
to a fatal problem: yum
died with that
ever-helpful message:
Cannot find a valid baseurl for repo: extras
This was mysterious, because our yum
configuration doesn't have an
'extras' repository, only 'base' (base Fedora Core 4 RPMs) and
'updates-released' (the updates themselves).
The cause is a new feature in yum
, where it will look in a list of
directories for files that describe additional repositories. (In
Fedora Core 4, Red Hat sets up all of the repositories this way for
reasons having to with how RPM operates.)
This new features, reposdir
, does not have to be explicitly
specified in your yum
configuration file; yum
uses a default
directory search path. Fedora Core 4 uses both the feature and one of
the default directories, so no reposdir
entry is in
/etc/yum.conf
.
Since our one started as a copy of that, we hadn't set a reposdir
either, so yum
was seeing our explicitly specified repository
locations and then also reading the normal system ones. This resulted
in the duplicates of 'base' and 'updates-released' that yum
had been
warning about, and when the install-time nameservice was broken a
complete inability to get information on the contents of 'extras', a
fatal error.
So: to completely use an alternate yum
configuration file, you
need to set an explicit reposdir
. Yum
is happy with the
directory not existing (assuming you specify the necessary
repositories explicitly in your configuration file), but you have to
override the default with something.
Comments on this page:
|
|