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.
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=""):
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
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...
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
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
fixed in 4.2.33 or higher (aka, headed for Update 3)
This is 4.2.33 and it is not fixed.
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!)
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.
Fixed in next version of up2date... I believe it will be 4.2.38-1 Adrian jumped the gun on announcing a fix. :)
Is the bug/fix in U3's up2date as well?
Yes. Fix is in RHEL 3 U3. Changed summary to something meaningful.
NOTE: I verified a yum, apt, and dir repo
*** Bug 129729 has been marked as a duplicate of this bug. ***
*** Bug 129027 has been marked as a duplicate of this bug. ***
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 !!!
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