Bug 150352

Summary: yum --installroot searches the normal root path for yum.repos.d/ if it does not exist in the specified installroot path.
Product: [Fedora] Fedora Reporter: Bryan Nielsen <burnin>
Component: yumAssignee: Jeremy Katz <katzj>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: katzj
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-03-04 20:15:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1548947    

Description Bryan Nielsen 2005-03-04 20:10:34 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041111 Firefox/1.0

Description of problem:
In setting up an nfs root tree for a diskless cluster (warewulf) I use
yum --installroot to specify the nfsroot path to which yum needs to
install the system. It was found that yum.repos.d/ did not exist in my
nfsroot path so yum searched the normal /etc/yum.repos.d/ path and
found the repo configuration for the server. By creating the
yum.repos.d dir in the installroot path yum no longer searched the
normal path. So with no yum.repos.d path created yum is not properly
processing the --installroot option.

Version-Release number of selected component (if applicable):
yum-2.1.12-0.fc3

How reproducible:
Always

Steps to Reproduce:
1. create a basic root tree:
mkdir -p /vnfs/dev/
mkdir -p /vnfs/etc/warewulf/
mkdir -p /vnfs/etc/warewulf/
mkdir -p /vnfs/var/lib/rpm
rpm --initdb --dbpath /vnfs/var/lib/rpm

2. Create a yum.conf file in the /vnfs/etc/ dir:
cat <<EOF >/vnfs/etc/yum.conf
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
exactarch=1

[base]
name=Fedora Core $releasever - $basearch - Base
baseurl=http://192.168.0.8/~burnin/mirror/fedora/$releasever/$basearch/os/
enabled=1
gpgcheck=0

EOF

3. Attempt a yum install on the new root tree:

yum --installroot /vnfs SysVinit


Actual Results:  The repos in the yum.conf from the installroot path
will be setup as expected and yum will then try to setup any repos it
finds in /etc/yum.repos.d/


Expected Results:  yum should only setup repos which are found in the
specified installroot path. If there is no yum.repos.d dir in the
installroot path then it should not look further.

Additional info:

Comment 1 Seth Vidal 2005-03-04 20:15:43 UTC
1. it's intended behavior
2. it's not going to change
3. if you want yum to ignore the repos.d path just set:
   reposdir=/some/place/that/doesn/t/exist

in your yum.conf in [main]