Bug 253352 - package-cleanup can't be run as non-root
package-cleanup can't be run as non-root
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-18 00:47 EDT by Ralf Corsepius
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version: 1.1.8-1.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-26 13:46:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ralf Corsepius 2007-08-18 00:47:47 EDT
Description of problem:

package-cleanup can't be run as ordinary (non-root) user:

# package-cleanup --orphans
Setting up yum
Traceback (most recent call last):
  File "/usr/bin/package-cleanup", line 402, in <module>
    main()
  File "/usr/bin/package-cleanup", line 365, in main
    my = initYum(opts)
  File "/usr/bin/package-cleanup", line 49, in initYum
    my.doSackSetup()
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 356, in doSackSetup
    return self._getSacks(archlist=archlist, thisrepo=thisrepo)
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 382, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.5/site-packages/yum/repos.py", line 206, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 141, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 198, in
_check_db_version
    if repo.repoXML.repoData.has_key(mdtype):
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 684, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 678, in _getRepoXML
    self._loadRepoXML(text=self)
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 661, in _loadRepoXML
    cache=self.http_caching == 'all')
  File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 565, in _getFile
    http_headers=headers,
  File "/usr/lib/python2.5/site-packages/urlgrabber/mirror.py", line 411, in urlgrab
    return self._mirror_try(func, url, kw)
  File "/usr/lib/python2.5/site-packages/urlgrabber/mirror.py", line 397, in
_mirror_try
    return func_ref( *(fullurl,), **kwargs )
  File "/usr/lib/python2.5/site-packages/urlgrabber/grabber.py", line 927, in
urlgrab
    return self._retry(opts, retryfunc, url, filename)
  File "/usr/lib/python2.5/site-packages/urlgrabber/grabber.py", line 845, in _retry
    r = apply(func, (opts,) + args, {})
  File "/usr/lib/python2.5/site-packages/urlgrabber/grabber.py", line 915, in
retryfunc
    fo._do_grab()
  File "/usr/lib/python2.5/site-packages/urlgrabber/grabber.py", line 1196, in
_do_grab
    else: new_fo = open(self.filename, 'wb')
IOError: [Errno 13] Permission denied: '//var/cache/yum/fedora/repomd.xml'

Version-Release number of selected component (if applicable):

Steps to Reproduce:
1. login as normal user
2. run 
package-cleanup --orphans
  
Actual results:
a traceback, c.f. above.

Expected results:
I don't understand why checking the package status on a system should require
write access to repomd.xml.
Comment 1 Ralf Corsepius 2007-08-18 00:50:04 EDT
Oops, forgot the version:

# rpm -qf /usr/bin/package-cleanup 
yum-utils-1.1.6-1.fc7
Comment 2 Tim Lauridsen 2007-09-28 08:45:59 EDT
fixed upstream, will be available in yum-utils-1.1.8
Comment 3 Fedora Update System 2007-10-24 03:03:52 EDT
yum-utils-1.1.8-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum-utils'
Comment 4 Fedora Update System 2007-11-26 13:46:18 EST
yum-utils-1.1.8-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

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