+++ This bug was initially created as a clone of Bug #232183 +++ Description of problem: When using yumdownloader, --resolve option produces traceback. Version-Release number of selected component (if applicable): yum-utils-1.0.3-1.fc6 How reproducible: Always Steps to Reproduce: 1.yumdownloader --resolve yum-utils 2.yumdownloader --source --enablerepo=extras-source yum-utils Actual results: Bin: yum-utils-1.0.3-1.fc6.noa 100% |=========================| 6.4 kB 00:00 Traceback (most recent call last): File "/usr/bin/yumdownloader", line 191, in ? main() File "/usr/bin/yumdownloader", line 159, in main if not pkg in toDownload: File "/usr/lib/python2.4/site-packages/yum/packages.py", line 191, in __eq__ if comparePoEVR(self, other) == 0 and self.arch == other.arch and self.name == other.name: File "/usr/lib/python2.4/site-packages/yum/packages.py", line 35, in comparePoEVR (e2, v2, r2) = (po2.epoch, po2.ver, po2.rel) AttributeError: TransactionMember instance has no attribute 'ver' Source: yum-utils-1.0.3-1.fc6.src 100% |=========================| 4.0 kB 00:00 yum-utils-1.0.3-1.fc6.src 100% |=========================| 4.0 kB 00:00 yum-utils-1.0.3-1.fc6.src 100% |=========================| 4.0 kB 00:00 yum-utils-1.0.3-1.fc6.src 100% |=========================| 4.0 kB 00:00 yum-utils-1.0.3-1.fc6.src 100% |=========================| 4.0 kB 00:00 yum-utils-1.0.3-1.fc6.src 100% |=========================| 4.0 kB 00:00 yum-utils-1.0.3-1.fc6.src 100% |=========================| 4.0 kB 00:00 yum-utils-1.0.3-1.fc6.src 100% |=========================| 4.0 kB 00:00 yum-utils-1.0.3-1.fc6.src 100% |=========================| 4.0 kB 00:00 yum-utils-1.0.3-1.fc6.src 100% |=========================| 4.0 kB 00:00 Traceback (most recent call last): File "/usr/bin/yumdownloader", line 191, in ? main() File "/usr/bin/yumdownloader", line 156, in main my.resolveDeps() File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 191, in resolveDeps self.populateTs(test=1) File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 150, in populateTs self.downloadHeader(txmbr.po) File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 760, in downloadHeader cache=repo.http_caching != 'none', File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 454, in getHeader cache=cache, File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 426, in __get raise Errors.RepoError, "failure: %s from %s: %s" % (relative, self.id, e) yum.Errors.RepoError: failure: yum-utils-1.0.3-1.fc6.src.rpm from extras-source: [Errno 256] No more mirrors to try. Expected results: It works. yumdownloader --resolve yum-utils always produces traceback on rhel 5.0 and 5.1 Actual results: [root@mscfimager-0 ~]# yumdownloader --resolve yum-utils Loading "priorities" plugin Loading "rhnplugin" plugin Loading "installonlyn" plugin Loading "fedorakmod" plugin Loading "skip-broken" plugin Loading "protectbase" plugin rhel-x86_64-client-workst 100% |=========================| 1.4 kB 00:00 rhn-tools-rhel-x86_64-cli 100% |=========================| 1.2 kB 00:00 rhel-x86_64-client-supple 100% |=========================| 1.2 kB 00:00 rhel-x86_64-client-5 100% |=========================| 1.4 kB 00:00 mscf-el5-apps-x86-64 100% |=========================| 1.2 kB 00:00 0 packages excluded due to repository priority protections 0 packages excluded due to repository protections yum-utils-1.0.4-3.el5.noa 100% |=========================| 7.7 kB 00:00 Traceback (most recent call last): File "/usr/bin/yumdownloader", line 191, in ? main() File "/usr/bin/yumdownloader", line 159, in main if not pkg in toDownload: File "/usr/lib/python2.4/site-packages/yum/packages.py", line 191, in __eq__ if comparePoEVR(self, other) == 0 and self.arch == other.arch and self.name == other.name: File "/usr/lib/python2.4/site-packages/yum/packages.py", line 35, in comparePoEVR (e2, v2, r2) = (po2.epoch, po2.ver, po2.rel) AttributeError: TransactionMember instance has no attribute 'ver' Expected results: No trace back... Additional info: [root@mscfimager-0 ~]# uname -a Linux mscfimager-0.emsl.pnl.gov 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:19 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux [root@mscfimager-0 ~]# rpm -qa |grep yum yum-3.0.1-5.el5 yum-allowdowngrade-1.0.4-1 yum-fedorakmod-1.0.4-1 yum-updateonboot-1.0.4-3.el5 yum-metadata-parser-1.0-8.fc6 yum-updatesd-3.0.1-5.el5 yum-fastestmirror-1.0.4-1 yum-tsflags-1.0.4-1 yum-protectbase-1.0.4-3.el5 yum-skip-broken-1.0.4-3.el5 yum-versionlock-1.0.4-3.el5 yum-utils-1.0.4-3.el5 yum-rhn-plugin-0.5.2-3.el5 yum-priorities-1.0.4-1 yum-downloadonly-1.0.4-3.el5 yum-changelog-1.0.4-3.el5
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
This looks like an old upstream bug, I guess, so should go away as we move to a newer yum-utils with the yum upgrade in 5.2.
Based on upstream code, as a temporary workaround use the below fix, In /usr/lib/python2.4/site-packages/yum/packages.py (e1, v1, r1) = (po1.epoch, po1.ver, po1.rel) (e2, v2, r2) = (po2.epoch, po2.ver, po2.rel) change the above line to, (e1, v1, r1) = (po1.epoch, po1.version, po1.release) (e2, v2, r2) = (po2.epoch, po2.version, po2.release) save the file, and execute
Try executing, yumdownloader --resolve yum-utils
*** Bug 435215 has been marked as a duplicate of this bug. ***
Hello, I can not download src.rpm with yumdownloader. I have tried with OLD/NEW packages and I believe it is problem with NEW ones. === OLD === # yum clean all Loading "protectbase" plugin Loading "kmod" plugin Loading "rhnplugin" plugin Loading "changelog" plugin Loading "security" plugin Loading "downloadonly" plugin Loading "installonlyn" plugin Loading "skip-broken" plugin Cleaning up Everything # rm -f *.rpm # yumdownloader --source --enablerepo=52-server-sources vim Loading "protectbase" plugin Loading "kmod" plugin Loading "rhnplugin" plugin Loading "installonlyn" plugin Loading "skip-broken" plugin 52-server-sources 100% |=========================| 951 B 00:00 primary.xml.gz 100% |=========================| 301 kB 00:00 ################################################## 1158/1158 0 packages excluded due to repository protections vim-7.0.109-3.el5.3.src.r 100% |=========================| 11 MB 00:01 === NEW === # yum clean all Loading "filter-data" plugin Loading "protectbase" plugin Loading "kmod" plugin Loading "aliases" plugin Loading "rhnplugin" plugin Loading "changelog" plugin Loading "protect-packages" plugin Loading "security" plugin Loading "downloadonly" plugin Loading "basearchonly" plugin Loading "list-data" plugin Loading "skip-broken" plugin Cleaning up Everything # rm -f *.rpm # yumdownloader --source --enablerepo=52-server-sources vim Loading "protectbase" plugin Loading "kmod" plugin Loading "rhnplugin" plugin Loading "skip-broken" plugin rhel-s390x-server-5 100% |=========================| 1.4 kB 00:00 rhel-s390x-server-fastrac 100% |=========================| 1.2 kB 00:00 rhel-s390x-server-supplem 100% |=========================| 1.4 kB 00:00 52-server-sources 100% |=========================| 951 B 00:00 primary.xml.gz 100% |=========================| 301 kB 00:00 52-server-: ################################################## 1158/1158 rhts 100% |=========================| 951 B 00:00 primary.xml.gz 100% |=========================| 22 kB 00:00 rhts : ################################################## 86/86 0 packages excluded due to repository protections No Match for argument vim Nothing to download === # cat /etc/yum.repos.d/rhel-52.repo === [52-server] name=Red Hat Enterprise Linux 5.2 Server baseurl=file:///mnt/redhat/rel-eng/RHEL5.2-Server-20080409.0/5/$basearch/os/ Server enabled=0 gpgcheck=0 [52-server-sources] name=Red Hat Enterprise Linux 5.2 Server baseurl=http://porkchop.devel.redhat.com/rel-eng/RHEL5.2-Server-20080409.0/5/ source/SRPMS/ enabled=0 gpgcheck=0 I have this version: yum-utils-1.1.10-8.el5.noarch I have tried on F8 and it seems to work OK: yum-utils-1.1.11-1.fc8.noarch What do you think about this?
Ok, this fixes it for me: --- /usr/bin/yumdownloader 2008-02-05 11:37:46.000000000 -0500 +++ yumdownloader 2008-04-11 12:37:33.000000000 -0400 @@ -221,7 +221,7 @@ """do a default setup for all the normal/necessary yum components, really just a shorthand for testing""" try: - self._getTs() + # self._getTs() self._getRpmDB() self._getRepos() # if '--source' is used the add src to the archlist ...can you confirm?
building -9 now ... as soon as I get need respin it'll be in the errata.
If I copy the yum-utils-1.1.10-9.el5.src.rpm from a local "make test-srpm", rebuild on the rhts machine and install the yum-utils pkg ... --source works. Can you make sure you weren't using -8?
Ha! So in the first case (new) ... you pass --noplugins which disables yum-rhn-plugin, which means yumdownloader doesn't have any _binary_ repos. so it can't map vim to a valid source package (it does this by looking for a matching binary package, and using the sourcerpm attribute of that pkg). In the second case (old), there is no --noplugins options ... so you have the binary repos. ... so everything works.
*** Bug 445773 has been marked as a duplicate of this bug. ***
An advisory 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-2008-0388.html
Reminder: This bug includes the 'RHTS' QA Whiteboard Keyword. Don't forget to add 'RHTSdone' to the QA Whiteboard along with a comment describing where the RHTS test can be found once the RHTS test has been written. Otherwise, if an RHTS will not be created, please remove RHTS from the qa whiteboard.