Opened 6 years ago

Closed 5 years ago

#98 closed defect (duplicate)

Unable to specify log location outside of %unixroot

Reported by: Lewis Rosenthal Owned by:
Priority: minor Milestone:
Component: yum Version:
Severity: Keywords:
Cc:

Description

On this machine, %unixroot is J:

Changing log location in yum.conf to systemwide log dir (c:/var/log) produces output from yum such as:

[j:\devel\yumie\yumie_preview7\scripts]yum info clamav
Loaded plugins: fastestmirror, remove-with-leaves
Traceback (most recent call last):
  File "J:\USR\BIN\YUM", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/@unixroot/usr/share/yum-cli/yummain.py", line 254, in user_main
    errcode = main(args)
  File "/@unixroot/usr/share/yum-cli/yummain.py", line 88, in main
    base.getOptionsConfig(args)
  File "/@unixroot/usr/share/yum-cli/cli.py", line 191, in getOptionsConfig
    self.conf
  File "/@unixroot/usr/lib/python2.7/site-packages/yum/__init__.py", line 781, i
n <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File "/@unixroot/usr/lib/python2.7/site-packages/yum/__init__.py", line 311, i
n _getConfig
    self.doFileLogSetup(self.conf.uid, self.conf.logfile)
  File "/@unixroot/usr/lib/python2.7/site-packages/yum/__init__.py", line 331, i
n doFileLogSetup
    logginglevels.setFileLog(uid, logfile)
  File "/@unixroot/usr/lib/python2.7/site-packages/yum/logginglevels.py", line 1
91, in setFileLog
    os.makedirs(logdir, mode=0755)
  File "/@unixroot/usr/lib/python2.7/os.py", line 152, in makedirs
    makedirs(head, mode)
  File "/@unixroot/usr/lib/python2.7/os.py", line 152, in makedirs
    makedirs(head, mode)
  File "/@unixroot/usr/lib/python2.7/os.py", line 159, in makedirs
    mkdir(name, mode)
OSError: [Errno 2] No such file or directory: '/@unixrootc:'

I have not tried relocating the yum cache, but suspect similar difficulty.

Change History (5)

comment:1 Changed 5 years ago by Lewis Rosenthal

Confirmed: yum cache path is also hardcoded to look at /@unixroot/<blah>. Thus, specifying cachedir=/@unixroot/somewhere-else yields an error that /@unixroot/@unixroot/somewhere-else cannot be found.

comment:2 Changed 5 years ago by Lewis Rosenthal

Related to issue #95.

comment:3 Changed 5 years ago by Yuri Dario

maybe you can try using

/@system_drive/var/log

instead, this does not expose a drive letter...

comment:4 Changed 5 years ago by Lewis Rosenthal

Unfortunately, Yuri, that gets me a nice, new directory in %unixroot%:

 1-13-15  11:27         <DIR>      124  @system_drive

Entry in yum.conf says:

logfile=/@system_drive/var/log/yum.log

Looks like without some way of faking a mount under %unixroot%.

Path rewriter says:

/var/log = %LOGFILES%

Environment says:

LOGFILES=C:\var\log

Changing logfile directive to:

logfile=/var/log/yum.log

seems to ignore the path rewriter (as expected, I suppose).

Looks like we'll need to wait for a fix on this until the drive letter support is working. Thanks for the suggested workaround, though. It was worth trying.

comment:5 Changed 5 years ago by Yuri Dario

Resolution: duplicate
Status: newclosed

Moving unixroot tree away from the root directory, while seems to be working, is not tested and we don't have the (human) resources to test all possible situations.

Note: See TracTickets for help on using tickets.