Bug 129215

Summary: up2date + yum = traceback
Product: Red Hat Enterprise Linux 3 Reporter: Rainer Traut <rainer.traut>
Component: up2dateAssignee: Adrian Likins <alikins>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: cstankaitis, jch, jjneely, ksnider, mitka, mohamed.eldesoky, oaaalton, petri.koistinen, ubeck, urkedal
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-02 05:07:19 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    

Description Rainer Traut 2004-08-05 06:37:50 UTC
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 15:38:25 UTC
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 16:25:30 UTC
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 16:34:11 UTC
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 17:16:06 UTC
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 17:51:24 UTC
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 18:36:33 UTC
fixed in 4.2.33 or higher (aka, headed for Update 3)

Comment 7 Rainer Traut 2004-08-18 06:43:08 UTC
This is 4.2.33 and it is not fixed.

Comment 8 Oliver Aaltonen 2004-08-23 16:03:11 UTC
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 15:30:11 UTC
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 12:52:52 UTC
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 19:09:34 UTC
Is the bug/fix in U3's up2date as well?

Comment 12 Todd Warner 2004-08-26 23:27:36 UTC
Yes. Fix is in RHEL 3 U3.

Changed summary to something meaningful.

Comment 13 Todd Warner 2004-08-26 23:28:15 UTC
NOTE: I verified a yum, apt, and dir repo

Comment 14 Todd Warner 2004-08-26 23:40:31 UTC
*** Bug 129729 has been marked as a duplicate of this bug. ***

Comment 15 Todd Warner 2004-08-27 00:55:12 UTC
*** Bug 129027 has been marked as a duplicate of this bug. ***

Comment 16 Mohamed Eldesoky 2004-09-01 11:00:03 UTC
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 05:07:20 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