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   
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:
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):

How reproducible:

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

name=Fedora Core $releasever - $basearch - Base


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:

in your yum.conf in [main]