Bug 134666 - Up2date crashes when using the --get-source switch
Up2date crashes when using the --get-source switch
Status: CLOSED RAWHIDE
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: up2date (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Adrian Likins
Fanny Augustin
:
: 136827 (view as bug list)
Depends On:
Blocks: 135876
  Show dependency treegraph
 
Reported: 2004-10-05 10:59 EDT by Phillip Sorensen
Modified: 2007-11-30 17:07 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-12 05:21:22 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 Phillip Sorensen 2004-10-05 10:59:59 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3)
Gecko/20040913 Firefox/0.10

Description of problem:
When running up2date from the command line with the --get-source
switch to download the source RPM, it fails with the following backtrace:

--- START BACKTRACE ---

Fetching all package list for channel: rhel-i386-as-4-beta...

Fetching package list for channel: rhel-i386-as-4-beta...
fd: <rhn.transports.File instance at 0xf66a5a6c>

kernel-2.6.8-1.528.2.10.src.rpm...
Traceback (most recent call last):
  File "/usr/sbin/up2date", line 1249, in ?
    sys.exit(main() or 0)
  File "/usr/sbin/up2date", line 715, in main
    return getPackages(pkgNames, source=1)
  File "/usr/sbin/up2date", line 1066, in getPackages
    onlySource = source)
  File "/usr/share/rhn/up2date_client/up2date.py", line 203, in getPackage
    progressCallback)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 310, in doCall
    ret = apply(method, args, kwargs)
  File "/usr/share/rhn/up2date_client/repoDirector.py", line 38, in
getPackageSource
    return self.handlers[channel['type']].getPackageSource(channel,
pkg, msgCallback, progressCallback)
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 198, in
getPackageSource
    MsgCallback, progressCallback)
  File "/usr/share/rhn/up2date_client/repoBackends/up2dateRepo.py",
line 182, in getPackageSource
    buffer = self._readFD(fd, filePath)
TypeError: _readFD() takes at least 6 arguments (3 given)

--- END BACKTRACE ---

I was able to fix this problem by changing line 182 to the following
two lines:

status = self.s.get_response_status()
buffer = self._readFD(fd, filePath, "w+", None, status, 0)

This is probably not the "right thing" but it works.  It looks like
the getPackageSource method needs to be changed to be closer to the
getPackage method. (It was from that method that I took the changes above)



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

How reproducible:
Always

Steps to Reproduce:
1. run up2date --get-source <package>
Comment 2 Adrian Likins 2004-10-13 16:32:37 EDT
should be fixed in 4.3.41
Comment 3 Jay Turner 2004-10-15 06:29:01 EDT
Doesn't look like it from my prospective:

[heisey (root):/var/spool/up2date]# rpm -q up2date
up2date-4.3.41-2

[heisey (root):/var/spool/up2date]# up2date --get-source rpm

Fetching all package list for channel: rhel-i386-as-4-beta...
########################################

Fetching package list for channel: rhel-i386-as-4-beta...
########################################
fd: <rhn.transports.File instance at 0xb7459cac>

rpm-4.3.2-8.src.rpm...
Traceback (most recent call last):
  File "/usr/sbin/up2date", line 1249, in ?
    sys.exit(main() or 0)
  File "/usr/sbin/up2date", line 715, in main
    return getPackages(pkgNames, source=1)
  File "/usr/sbin/up2date", line 1066, in getPackages
    onlySource = source)
  File "/usr/share/rhn/up2date_client/up2date.py", line 203, in getPackage
    progressCallback)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 310, in doCall
    ret = apply(method, args, kwargs)
  File "/usr/share/rhn/up2date_client/repoDirector.py", line 38, in
getPackageSource
    return self.handlers[channel['type']].getPackageSource(channel,
pkg, msgCallback, progressCallback)
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 198, in
getPackageSource
    MsgCallback, progressCallback)
  File "/usr/share/rhn/up2date_client/repoBackends/up2dateRepo.py",
line 182, in getPackageSource
    buffer = self._readFD(fd, filePath)
TypeError: _readFD() takes at least 6 arguments (3 given)
Comment 4 Bill Nottingham 2004-10-22 21:01:29 EDT
*** Bug 136827 has been marked as a duplicate of this bug. ***
Comment 6 Jay Turner 2004-11-12 05:21:22 EST
Issue does appear to be resolved with up2date-4.3.44-2.

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