Bug 167301 - Default cachedir/logfile/reposdir is incorrect w/--installroot
Default cachedir/logfile/reposdir is incorrect w/--installroot
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
Depends On:
  Show dependency treegraph
Reported: 2005-09-01 10:05 EDT by John Dalbec
Modified: 2014-01-21 17:52 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-01 13:05:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John Dalbec 2005-09-01 10:05:02 EDT
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 13:28:17 EDT
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.