Bug 432889 - yumdownloader tries/fails to update mirrorlist.txt when run as non-root
yumdownloader tries/fails to update mirrorlist.txt when run as non-root
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-14 17:27 EST by Ville Skyttä
Modified: 2014-01-21 01:10 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-03-05 10:42:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Ville Skyttä 2008-02-14 17:27:27 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/
total 30788
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
manifest itself.
Comment 1 Ville Skyttä 2008-02-14 17:28:33 EST
Oops, this is yum-utils-1.1.11-1.fc8.noarch on F8, not devel.
Comment 2 Tim Lauridsen 2008-05-30 07:05:42 EDT
I can reproduce this issue, working on a way to get around it
Comment 3 Jan Hutař 2008-08-07 07:44:55 EDT
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):

yum-3.2.7-1.fc8
yum-utils-1.1.8-1.fc8
yum-fastestmirror-1.1.8-1.fc8
Comment 4 Ville Skyttä 2008-08-08 16:51:05 EDT
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:

yum-fastestmirror-1.1.14-4.fc9.noarch
yum-3.2.17-2.fc9.noarch
yum-utils-1.1.14-4.fc9.noarch
yum-metadata-parser-1.1.2-8.fc9.x86_64
Comment 5 Bug Zapper 2008-11-26 04:49:17 EST
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: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 6 Ville Skyttä 2008-11-26 14:40:14 EST
The error is still there with:

yum-utils-1.1.17-1.fc9.noarch
yum-3.2.19-3.fc9.noarch
yum-fastestmirror-1.1.17-1.fc9.noarch
yum-metadata-parser-1.1.2-9.fc9.x86_64

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__             
    self.main()                                                   
  File "/usr/bin/yumdownloader", line 75, in main                 
    self.doUtilYumSetup(opts)                                     
  File "/usr/bin/yumdownloader", line 252, in doUtilYumSetup      
    self._getSacks(archlist=archlist)                             
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 434, in _getSacks
    self.repos.populateSack(which=repos)                                         
  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
    return repo._check_db_version(mdtype)
  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
    self._loadRepoXML(text=self)
  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
    if self._commonLoadRepoXML(text):
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 931, in _commonLoadRepoXML
    self._saveOldRepoXML(local)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 836, in _saveOldRepoXML
    shutil.copy2(local, old_local)
  File "/usr/lib64/python2.5/shutil.py", line 91, in copy2
    copyfile(src, dst)
  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'
Comment 8 Ville Skyttä 2009-03-05 18:14:06 EST
Yep, looks good, thanks.

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