Bug 167301 - Default cachedir/logfile/reposdir is incorrect w/--installroot
Summary: Default cachedir/logfile/reposdir is incorrect w/--installroot
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 3
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-09-01 14:05 UTC by John Dalbec
Modified: 2014-01-21 22:52 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2005-09-01 17:05:38 UTC

Attachments (Terms of Use)

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/

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:

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

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 ?
  File "/usr/share/yum-cli/yummain.py", line 51, in main
  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.

Note You need to log in before you can comment on or make changes to this bug.