This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 391791 - yumdownloader Crashes When Using --resolve
yumdownloader Crashes When Using --resolve
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum (Show other bugs)
5.1
All Linux
medium Severity medium
: rc
: ---
Assigned To: James Antill
:
: 435215 445773 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-20 05:08 EST by Martin Poole
Modified: 2010-10-22 16:34 EDT (History)
4 users (show)

See Also:
Fixed In Version: RHBA-2008-0388
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-21 10:21:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Martin Poole 2007-11-20 05:08:48 EST
+++ 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
Comment 1 RHEL Product and Program Management 2007-11-20 05:15:03 EST
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.
Comment 2 James Antill 2007-11-20 08:39:09 EST
 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.
Comment 4 Sharmilla Abhilash 2007-12-28 01:18:20 EST
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

 
Comment 5 Sharmilla Abhilash 2007-12-28 01:20:30 EST
Try executing,

yumdownloader --resolve yum-utils
Comment 7 James Antill 2008-02-27 22:33:01 EST
*** Bug 435215 has been marked as a duplicate of this bug. ***
Comment 8 Jan Hutař 2008-04-11 08:14:09 EDT
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?
Comment 9 James Antill 2008-04-11 12:40:56 EDT
 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?
Comment 19 James Antill 2008-04-17 14:15:29 EDT
 building -9 now ... as soon as I get need respin it'll be in the errata.
Comment 24 James Antill 2008-04-21 14:01:01 EDT
 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?
Comment 27 James Antill 2008-04-21 15:21:30 EDT
 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.
Comment 33 James Antill 2008-05-09 00:51:35 EDT
*** Bug 445773 has been marked as a duplicate of this bug. ***
Comment 34 errata-xmlrpc 2008-05-21 10:21:42 EDT
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
Comment 36 Chris Ward 2008-06-17 11:48:29 EDT
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.

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