Bug 149281 - up2date crashes if files in yum repository aren't readable
up2date crashes if files in yum repository aren't readable
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: up2date (Show other bugs)
4.0
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Pradeep Kilambi
Ken Reilly
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-02-21 17:24 EST by Steve Cleveland
Modified: 2013-02-26 19:49 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 09:26:32 EDT
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 Steve Cleveland 2005-02-21 17:24:09 EST
Description of problem:

I have up2date setup with a local yum repositories for errata updates.  I
downloaded the latest kernel packages today and forgot to make them world readable.

I then tried to update one of my client machines to the latest kernel and go the
following error:

Fetching Obsoletes list for channel: rhel4-updates...
 
Name                                    Version        Rel
----------------------------------------------------------
kernel-smp                              2.6.9          5.0.3.EL          i686
 
 
Testing package set / solving RPM inter-dependencies...
########################################
kernel-smp-2.6.9-5.0.3.EL.i
Traceback (most recent call last):
  File "/usr/sbin/up2date", line 1245, in ?
    sys.exit(main() or 0)
  File "/usr/sbin/up2date", line 800, in main
    fullUpdate, dryRun=options.dry_run))
  File "/usr/sbin/up2date", line 1119, in batchRun
    batch.run()
  File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 83, in run
    self.__getPackages()
  File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 164, in __getPackages
    up2date.getPackage(pkg, wrapperUtils.printPkg, wrapperUtils.printRetrieveHash)
  File "/usr/share/rhn/up2date_client/up2date.py", line 178, in getPackage
    buf = rpcServer.doCall(repos.getPackage, pkg, msgCallback, progressCallback)
 File "/usr/share/rhn/up2date_client/rpcServer.py", line 309, in doCall
    ret = apply(method, args, kwargs)
  File "/usr/share/rhn/up2date_client/repoDirector.py", line 35, in getPackage
    return self.handlers[channel['type']].getPackage(pkg, msgCallback,
progressCallback)
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 186, in getPackage
    package = source.getPackage(pkg, MsgCallback, progressCallback)
  File "/usr/share/rhn/up2date_client/repoBackends/yumRepo.py", line 138, in
getPackage
    agent = "Up2date %s/Yum" % up2dateUtils.version())
  File "/usr/share/rhn/up2date_client/repoBackends/urlUtils.py", line 360, in
fetchUrlAndWriteFD
    ret =  readFDBufWriteFD(fh, writefd, progressCallback)
  File "/usr/share/rhn/up2date_client/repoBackends/urlUtils.py", line 295, in
readFDBufWriteFD
    amt = size - size_read
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

Obviously, the problem was that it couldn't download the file, but it should
give an error message to that effect instead of generating a traceback.


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

How reproducible:
Every time

Steps to Reproduce:
1.  Make a package available in a yum repository
2.  Change permissions such that the file isn't accessible (unreadable by the
    web server)
3.  Try to use up2date to install/upgrade the package
  
Actual results:
Traceback dump

Expected results:
An error message indicating that up2date couldn't read/find the file.


Additional info:
Comment 1 Jason Connor 2005-04-14 13:22:53 EDT
Added a check for the read failure, method should now properly return.
Comment 2 Bernie Innocenti 2009-03-18 11:25:23 EDT
Can this bug be closed?
Comment 3 Steve Cleveland 2009-03-18 11:43:56 EDT
I don't have any RHEL4 machines to test with, but I'll assume it's fixed.
Comment 5 Bernie Innocenti 2009-10-04 20:25:10 EDT
(In reply to comment #3)
> I don't have any RHEL4 machines to test with, but I'll assume it's fixed.  

Then you should close the bug yourself (I don't have the necessary permissions).
Comment 6 Jiri Pallich 2012-06-20 09:26:32 EDT
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. 
Please See https://access.redhat.com/support/policy/updates/errata/

If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.

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