Bug 129215 - up2date + yum = traceback
up2date + yum = traceback
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: up2date (Show other bugs)
3.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Adrian Likins
:
: 129729 (view as bug list)
Depends On:
Blocks: up2date-rhel3-u3
  Show dependency treegraph
 
Reported: 2004-08-05 02:37 EDT by Rainer Traut
Modified: 2007-11-30 17:07 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-02 01:07:19 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 Rainer Traut 2004-08-05 02:37:50 EDT
Description of problem:
Up2date in his latest version fails if yum repositories defined.
All earlier versions worked fine.

Version-Release number of selected component (if applicable):
[root@asp7 root]# rpm -qa|grep up2date
up2date-gnome-4.2.33-1
up2date-4.2.33-1
[root@asp7 root]#

How reproducible:
always

Steps to Reproduce:
1. have a yum repository configured
[root@asp7 root]# cat /etc/sysconfig/rhn/sources
# Eigene Pakete
yum contributed http://server:8080/contributed
[root@asp7 root]#
2.
[root@asp7 root]# up2date -u -vvvv
D: availablePackageList::channels:
<up2date_client.rhnChannel.rhnChannelList instance at 0x81a502c>
D: add instance class name yum
D: add instance class name yumdiskcache
D: add instance class name memcache
D: add instance class name yum-diskcache
D: add instance class name yum-localdisk
D: add instance class name yum
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/yumRepo.py", line
266, in listPackages
    hdr = rd.getHeader([name,ver,rel,epoch,arch, "0",channel['label']])
  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)
[root@asp7 root]# 

3.
  
Actual results:
error

Expected results:
installing packages

Additional info:
all earlier versions worked wo. problem
I think this is security related as this breaks rhn, too.
Comment 1 Dimitri Tarassenko 2004-08-06 11:38:25 EDT
This can be fixede by making the second parameter of readHeaderBlob()
in  /usr/share/rhn/up2date_client/rpmUtils.py(520) optional:

change

def readHeaderBlob(blob, filename):

to:

def readHeaderBlob(blob, filename=""):
Comment 2 Dimitri Tarassenko 2004-08-06 12:25:30 EDT
Also, the same problem is existing when accessing directory based
repositories, so if someone would fix this bug in a correct way, not
as I did it, both yumRepo.py and dirRepo.py need to be changed
Comment 3 Rainer Traut 2004-08-06 12:34:11 EDT
I fixed it in /usr/share/rhn/up2date_client/repoBackends/yumRepo.py on
line 100.
The function call there is the only one I found so far which misses
the second argument.
I changed line 100 to
hdr = rpmUtils.readHeaderBlob(hdrBuf,remoteFilename)

Don't know though if 'remoteFilename' is the right string...
Comment 4 Dimitri Tarassenko 2004-08-06 13:16:06 EDT
Yes it is. Anyway, the second parameter in readHeaderBlob is only used
for error output as I can see. Also, there is one more occurence of
readHeaderBlob in yupRepo.py, line 324
Comment 5 Dag Wieers 2004-08-17 13:51:24 EDT
For those people that experience the problem with my RHEL3 repository,
I noticed that using an Apt repository still works. So you can simply
replace:

    yum dag http://apt.sw.be/redhat/el3/en/i386/dag

by

    apt dag http://apt.sw.be redhat/el3/en/i386 dag

Beware of the whitespaces instead of the slashes
Comment 6 Adrian Likins 2004-08-17 14:36:33 EDT
fixed in 4.2.33 or higher (aka, headed for Update 3)
Comment 7 Rainer Traut 2004-08-18 02:43:08 EDT
This is 4.2.33 and it is not fixed.
Comment 8 Oliver Aaltonen 2004-08-23 12:03:11 EDT
I am also using up2date-4.2.33-1, with the same problem. If I roll
back to 4.2.16-1, everything works fine. Coincidentally, I've
encountered the error with my own yum repository, as well as Dag's.
(By the way, thanks for the work-around suggestion, Dag!)
Comment 9 Chris Stankaitis 2004-08-24 11:30:11 EDT
nod still and issue with up2date-4.2.33-1 on RHEL-3WS adding my 2
cents and myself to this bug to see the progress.
Comment 10 Todd Warner 2004-08-26 08:52:52 EDT
Fixed in next version of up2date... I believe it will be 4.2.38-1
Adrian jumped the gun on announcing a fix. :)
Comment 11 Need Real Name 2004-08-26 15:09:34 EDT
Is the bug/fix in U3's up2date as well?
Comment 12 Todd Warner 2004-08-26 19:27:36 EDT
Yes. Fix is in RHEL 3 U3.

Changed summary to something meaningful.
Comment 13 Todd Warner 2004-08-26 19:28:15 EDT
NOTE: I verified a yum, apt, and dir repo
Comment 14 Todd Warner 2004-08-26 19:40:31 EDT
*** Bug 129729 has been marked as a duplicate of this bug. ***
Comment 15 Todd Warner 2004-08-26 20:55:12 EDT
*** Bug 129027 has been marked as a duplicate of this bug. ***
Comment 16 Mohamed Eldesoky 2004-09-01 07:00:03 EDT
Why on earth it is delayed for U3 ?? 
Don't you have paid customers who should get faster response ?? 
And it was working fine before, so it is easy to release a bugfix 
within hours to fix the newly introduced bug !!! 
Comment 17 John Flanagan 2004-09-02 01:07:20 EDT
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

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