Red Hat Bugzilla – Bug 432889
yumdownloader tries/fails to update mirrorlist.txt when run as non-root
Last modified: 2014-01-21 01:10:28 EST
yumdownloader has issues in a case where it is run as non-root, mirrorlists are
in use, and metadata_expire has passed. For purposes of testing, I've set
metadata_expire to 1 in /etc/yum.conf.
$ ls -la /var/cache/yum/development/
drwxr-xr-x 3 root root 4096 2008-02-15 00:19 .
drwxr-xr-x 11 root root 4096 2008-02-15 00:12 ..
-rw-r--r-- 1 root root 0 2008-02-15 00:19 cachecookie
-rw-r--r-- 1 root root 1352 2008-02-15 00:19 mirrorlist.txt
drwxr-xr-x 2 root root 4096 2008-02-15 00:12 packages
-rw-r--r-- 1 root root 31462400 2008-02-15 00:13 primary.sqlite
-rw-r--r-- 1 root root 2142 2008-02-14 13:00 repomd.xml
$ yumdownloader --enablerepo=development taglib.x86_64
Cannot write to file ./taglib-1.5-0.9.rc1.fc9.x86_64.rpm. Error was: [Errno 13]
Permission denied: '//var/cache/yum/development/mirrorlist.txt'
If using baseurl instead of mirrorlist in the repo config, this problem doesn't
Oops, this is yum-utils-1.1.11-1.fc8.noarch on F8, not devel.
I can reproduce this issue, working on a way to get around it
I was not able to reproduce this:
# rm -rf /var/cache/yum/*
$ yumdownloader rsh --enablerepo=development
Loading "fastestmirror" plugin
Cannot handle specific enablerepo/disablerepo options.
$ yumdownloader rsh
Loading "fastestmirror" plugin
Determining fastest mirrors
rsh-0.17-44.fc8.i386.rpm 100% |=========================| 43 kB 00:00
Using this (F8-GOLD):
Make sure you are indeed using a repo config that uses mirrorlists. And note this:
> $ yumdownloader rsh --enablerepo=development
> Loading "fastestmirror" plugin
> Cannot handle specific enablerepo/disablerepo options.
At least on F-9, the "development" repo does not exist, it has been renamed to "rawhide". I can still reproduce with these on F-9:
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '8'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 8's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 8 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
The error is still there with:
Additionally, with previous metadata in /var/cache/yum/..., I also see this which I suppose is not related to mirror lists, so maybe the problem is deeper than that:
$ yumdownloader --enablerepo=rawhide taglib.x86_64
Loaded plugins: fastestmirror
Traceback (most recent call last):
File "/usr/bin/yumdownloader", line 293, in <module>
util = YumDownloader()
File "/usr/bin/yumdownloader", line 42, in __init__
File "/usr/bin/yumdownloader", line 75, in main
File "/usr/bin/yumdownloader", line 252, in doUtilYumSetup
File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 434, in _getSacks
File "/usr/lib/python2.5/site-packages/yum/repos.py", line 251, in populateSack
sack.populate(repo, mdtype, callback, cacheonly)
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 159, in populate
if self._check_db_version(repo, mydbtype):
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 216, in _check_db_version
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 958, in _check_db_version
repoXML = self.repoXML
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1116, in <lambda>
repoXML = property(fget=lambda self: self._getRepoXML(),
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1108, in _getRepoXML
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1098, in _loadRepoXML
return self._groupLoadRepoXML(text, ["primary"])
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1082, in _groupLoadRepoXML
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 931, in _commonLoadRepoXML
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 836, in _saveOldRepoXML
File "/usr/lib64/python2.5/shutil.py", line 91, in copy2
File "/usr/lib64/python2.5/shutil.py", line 47, in copyfile
fdst = open(dst, 'wb')
IOError: [Errno 13] Permission denied: '//var/cache/yum/rawhide/repomd.xml.old.tmp'
This one should fix the issue
Yep, looks good, thanks.