Bug 167301

Summary: Default cachedir/logfile/reposdir is incorrect w/--installroot
Product: [Fedora] Fedora Reporter: John Dalbec <jpdalbec>
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-09-01 17:05:38 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:

Description John Dalbec 2005-09-01 14:05:02 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20050729 Netscape/8.0.3.3

Description of problem:
When running yum --installroot the default values for cachedir, logfile, and reposdir include the install root.  The code

        # do the dirs - set the root if there is one (grumble)
        for opt in ['cachedir', 'reposdir', 'logfile']:
            path = self.configdata[opt]
            root = self.configdata['installroot']
            rootedpath = root + path
            self.configdata[opt] = rootedpath

in /usr/lib/python2.3/site-packages/yum/config.py then prefixes these values (unless overridden) with a second copy of the path to the install root.

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


How reproducible:
Always

Steps to Reproduce:
1. Install mach (http://thomas.apestaart.org/projects/mach/).
2. Run "mach -r fc3 setup minimal".
3.
  

Actual Results:  error: /usr/sbin/mach-helper yum -c /var/lib/mach/states/fedora-3-i386-core/yum.conf --installroot=/var/lib/mach/roots/fedora-3-i386-core  -y -y install bash glibc failed.
 Traceback (most recent call last):
  File "/usr/bin/yum", line 8, in ?
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 51, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 157, in getOptionsConfig
    logfd = os.open(self.conf.getConfigOption('logfile'), os.O_WRONLY |
OSError: [Errno 2] No such file or directory: '/var/lib/mach/roots/fedora-3-i386-core/var/lib/mach/roots/fedora-3-i386-core/var/log/yum.log'


Expected Results:  Successful setup

Additional info:

For now I think I will recommend that mach set "logfile" in its yum.conf file.

Comment 1 John Dalbec 2005-09-01 17:28:17 UTC
Sorry, this is fixed in the latest erratum for FC3.