This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 215266 - yumdownloader gives an ugly error message when it cannot write to the working directory
yumdownloader gives an ugly error message when it cannot write to the working...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-12 22:58 EST by Tim Mayberry
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-02-14 04:32:58 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 Tim Mayberry 2006-11-12 22:58:51 EST
Description of problem:

yumdownloader gives an ugly error message(Traceback) when it doesn't have write
permission on the current working directory.

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

yum-utils-1.0.1-1.fc6

How reproducible:

Try and download a package with a non-writable working directory
  
Actual results:

Traceback (most recent call last):
  File "/usr/bin/yumdownloader", line 191, in ?
    main()
  File "/usr/bin/yumdownloader", line 181, in main
    path = repo.getPackage(download)
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 468, in getPackage
    cache=cache
  File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 451, in __get
    http_headers=headers,
  File "/usr/lib/python2.4/site-packages/urlgrabber/mirror.py", line 411, in urlgrab
    return self._mirror_try(func, url, kw)
  File "/usr/lib/python2.4/site-packages/urlgrabber/mirror.py", line 397, in
_mirror_try
    return func_ref( *(fullurl,), **kwargs )
  File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 927, in
urlgrab
    return self._retry(opts, retryfunc, url, filename)
  File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 845, in _retry
    r = apply(func, (opts,) + args, {})
  File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 915, in
retryfunc
    fo._do_grab()
  File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1196, in
_do_grab
    else: new_fo = open(self.filename, 'wb')
IOError: [Errno 13] Permission denied: './xsane-0.991-2.fc6.src.rpm'

Expected results:

"Unable to write to current working directory" or whatever

Additional info:

It would be nice if testing that the current directory was writable was done as
a first step as it takes roughly 6 seconds to produce the above error on my system.
Comment 1 Tim Lauridsen 2007-02-14 04:32:58 EST
yumdownloader is a simple tool, it fails if it can't write to the current
directory or runs out of diskspace or something else.
I think it is out of scope for a tool like yumdownloader to catch all these
speciel conditions and give more human readable error messages.
Feel free to create a patch and i will add it.

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