Bug 129027

Summary: Invalid function call in new up2date
Product: Red Hat Enterprise Linux 3 Reporter: Petter Urkedal <urkedal>
Component: up2dateAssignee: Adrian Likins <alikins>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: barryn, elliot, jjneely, tao, ubeck
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-02 05:07:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 124236    
Attachments:
Description Flags
Updated yumRepo to fix problem
none
updated dirRepo to fix problem none

Description Petter Urkedal 2004-08-03 08:40:25 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7)
Gecko/20040615 Firefox/0.9

Description of problem:
I get the error below when I 'update-nox -u'.  My system has
rpm-python-4.2.2-0.14.

Traceback (most recent call last):
  File "/usr/sbin/up2date-nox", line 1174, in ?
    sys.exit(main() or 0)
  File "/usr/sbin/up2date-nox", line 772, in main
    fullUpdate, dryRun=options.dry_run))
  File "/usr/sbin/up2date-nox", line 1066, in batchRun
    batch.run()
  File "up2dateBatch.py", line 62, in run
  File "up2dateBatch.py", line 97, in __findPackagesToUpdate
  File "packageList.py", line 157, in addGlobs
  File "rhnPackageInfo.py", line 232, in getAvailablePackageList
  File "rhnPackageInfo.py", line 166, in availablePackageList
  File "rpcServer.py", line 304, in doCall
  File "repoDirector.py", line 20, in listPackages
  File "rpmSource.py", line 226, in listPackages
  File "/usr/share/rhn/up2date_client/repoBackends/dirRepo.py", line
132, in listPackages
    hdr = rpmUtils.readHeaderBlob(hdrBuf.unload())
TypeError: readHeaderBlob() takes exactly 2 arguments (1 given)


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

How reproducible:
Always

Steps to Reproduce:
1. up2date -u
2.
3.
    

Additional info:

Comment 1 Geoff Dolman 2004-08-03 16:06:39 UTC
Hi I also get this problem.
I can provide a bit more info:

My system has a dir repository of rpms. If this is an empty directory
or if I comment the repository details out of
/etc/sysconfig/rhn/sources then up2date works as expected.
However, if there are *any* rpms in the repository directory specified
then up2date bails out.

I have several machines that are using the same repository but are
still using up2date-4.2.16-1 and they work.

compare these two (foo is not a real package just an example without
changing anything):
#1
compute3 [~]rpm -q up2date
up2date-4.2.16-1
compute3 [~]up2date foo
 
Fetching package list for channel: rhel-i386-ws-3...
########################################
 
Fetching package list for channel: rhel-i386-ws-3-extras...
########################################
 
Fetching package list for channel: dil-rpms...
 
Fetching Obsoletes list for channel: rhel-i386-ws-3...
########################################
 
Fetching Obsoletes list for channel: rhel-i386-ws-3-extras...
########################################
 
Fetching Obsoletes list for channel: dil-rpms...
########################################
 
Fetching rpm headers...
########################################
 
Name                                    Version        Rel
----------------------------------------------------------
 
 
The following packages you requested were not found:
foo

versus
#2
compute2 [~]rpm -q up2date
up2date-4.2.33-1
compute2 [~]up2date foo
Traceback (most recent call last):
  File "/usr/sbin/up2date", line 1174, in ?
    sys.exit(main() or 0)
  File "/usr/sbin/up2date", line 772, in main
    fullUpdate, dryRun=options.dry_run))
  File "/usr/sbin/up2date", line 1066, in batchRun
    batch.run()
  File "up2dateBatch.py", line 62, in run
  File "up2dateBatch.py", line 97, in __findPackagesToUpdate
  File "packageList.py", line 157, in addGlobs
  File "rhnPackageInfo.py", line 232, in getAvailablePackageList
  File "rhnPackageInfo.py", line 166, in availablePackageList
  File "rpcServer.py", line 304, in doCall
  File "repoDirector.py", line 20, in listPackages
  File "rpmSource.py", line 226, in listPackages
  File "/usr/share/rhn/up2date_client/repoBackends/dirRepo.py", line
132, in listPackages
    hdr = rpmUtils.readHeaderBlob(hdrBuf.unload())
TypeError: readHeaderBlob() takes exactly 2 arguments (1 given)

Comment 2 Adrian Likins 2004-08-03 19:26:32 UTC
hmm, indeed. Fixed in 4.2.34, should be out soon

Comment 3 Elliot Peele 2004-08-03 22:29:08 UTC
This also effects yum repos.

Traceback (most recent call last):
  File "/usr/sbin/up2date", line 1174, in ?
    sys.exit(main() or 0)
  File "/usr/sbin/up2date", line 772, in main
    fullUpdate, dryRun=options.dry_run))
  File "/usr/sbin/up2date", line 1066, in batchRun
    batch.run()
  File "up2dateBatch.py", line 62, in run
  File "up2dateBatch.py", line 108, in __findPackagesToUpdate
  File "packageList.py", line 611, in getPackagesToInstall
  File "packageList.py", line 640, in __skipPackages
  File "packageList.py", line 661, in __skipFiles
  File "packageList.py", line 700, in buildHeaderList
  File "headers.py", line 37, in __getitem__
  File "headers.py", line 42, in __retrievePackage
  File "rpcServer.py", line 304, in doCall
  File "repoDirector.py", line 31, in getHeader
  File "rpmSource.py", line 210, in getHeader
  File "/usr/share/rhn/up2date_client/repoBackends/yumRepo.py", line
100, in getHeader
    hdr = rpmUtils.readHeaderBlob(hdrBuf)
TypeError: readHeaderBlob() takes exactly 2 arguments (1 given)

Comment 4 Uwe Beck 2004-08-04 08:02:05 UTC
I have the same problem with yum repository. Version up2date-4.2.16-1
in RHEL3 works with yum repositorys. If you look in
/etc/sysconfig/rhn/sources in RHEL3 you see, that RHEL3 offiziell
support yum or local directory repository.
Here is the entry I use in source.

### an yum style repo
### format:
### type  channel-label     url

yum pclin01-es3 http://pclin01.le.cadcam.debis.de/rhub30_updates_errata

--------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/share/rhn/up2date_client/gui.py", line 1358, in
onChannelsPageNext
    self.pList.run()
  File "/usr/share/rhn/up2date_client/packageList.py", line 122, in run
    self.progressCallback)
  File "/usr/share/rhn/up2date_client/rhnPackageInfo.py", line 328, in
getAvailableAllArchPackageList
    package_list = availablePackageList(
  File "/usr/share/rhn/up2date_client/rhnPackageInfo.py", line 166, in
availablePackageList
    progressCallback = progressCallback)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 304, in doCall
    ret = apply(method, args, kwargs)
  File "/usr/share/rhn/up2date_client/repoDirector.py", line 20, in
listPackages
    return self.handlers[channel['type']].listPackages(channel,
msgCallback, progressCallback)
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 226, in
listPackages
    msgCallback, progressCallback)
  File "/usr/share/rhn/up2date_client/repoBackends/yumRepo.py", line
266, in listPackages
    hdr = rd.getHeader([name,ver,rel,epoch,arch, "0",channel['label']])
  File "/usr/share/rhn/up2date_client/repoDirector.py", line 31, in
getHeader
    return self.handlers[channel['type']].getHeader(pkg, msgCallback,
progressCallback)
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 210, in
getHeader
    header = source.getHeader(pkg, progressCallback = progressCallback)
  File "/usr/share/rhn/up2date_client/repoBackends/yumRepo.py", line
100, in getHeader
    hdr = rpmUtils.readHeaderBlob(hdrBuf)
TypeError: readHeaderBlob() takes exactly 2 arguments (1 given)
Traceback (most recent call last):
  File "/usr/share/rhn/up2date_client/gui.py", line 1424, in
onSkippedPagePrepare
    self.__preparePackageList()
  File "/usr/share/rhn/up2date_client/gui.py", line 1310, in
__preparePackageList
    self.pList.run()
  File "/usr/share/rhn/up2date_client/packageList.py", line 122, in run
    self.progressCallback)
  File "/usr/share/rhn/up2date_client/rhnPackageInfo.py", line 328, in
getAvailableAllArchPackageList
    package_list = availablePackageList(
  File "/usr/share/rhn/up2date_client/rhnPackageInfo.py", line 166, in
availablePackageList
    progressCallback = progressCallback)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 304, in doCall
    ret = apply(method, args, kwargs)
  File "/usr/share/rhn/up2date_client/repoDirector.py", line 20, in
listPackages
    return self.handlers[channel['type']].listPackages(channel,
msgCallback, progressCallback)
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 226, in
listPackages
    msgCallback, progressCallback)
  File "/usr/share/rhn/up2date_client/repoBackends/yumRepo.py", line
266, in listPackages
    hdr = rd.getHeader([name,ver,rel,epoch,arch, "0",channel['label']])
  File "/usr/share/rhn/up2date_client/repoDirector.py", line 31, in
getHeader
    return self.handlers[channel['type']].getHeader(pkg, msgCallback,
progressCallback)
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 210, in
getHeader
    header = source.getHeader(pkg, progressCallback = progressCallback)
  File "/usr/share/rhn/up2date_client/repoBackends/yumRepo.py", line
100, in getHeader
    hdr = rpmUtils.readHeaderBlob(hdrBuf)
TypeError: readHeaderBlob() takes exactly 2 arguments (1 given)
--------------------------------------------------------------------

After this Traceback you need kill -9 to cancel up2date-4.2.33-1.

Uwe


Comment 5 Joseph Schmigel 2004-08-05 12:45:56 UTC
Created attachment 102444 [details]
Updated yumRepo to fix problem

Copy this over the current yumRepo.py (usually found in
/usr/share/rhn/up2date_client/repoBackends/).

Comment 6 Joseph Schmigel 2004-08-05 12:49:12 UTC
Created attachment 102445 [details]
updated dirRepo to fix problem

Copy over current dirRepo.py usually in
/usr/share/rhn/up2date_client/repoBackends/ to fix the directory repositories.

Comment 7 Todd Warner 2004-08-27 00:55:06 UTC

*** This bug has been marked as a duplicate of 129215 ***

Comment 8 John Flanagan 2004-09-02 05:07:18 UTC
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-427.html