Bug 239974

Summary: yum traceback when package has no SHA1HEADER
Product: [Fedora] Fedora Reporter: Ville Skyttä <ville.skytta>
Component: yumAssignee: Jeremy Katz <katzj>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6Keywords: Patch
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-14 19:13:21 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:
Attachments:
Description Flags
Tolerate packages without SHA1HEADER none

Description Ville Skyttä 2007-05-13 18:52:03 UTC
yum-3.0.6-1.fc6 barfs when resolving deps if some of the packages satisfying
dependencies do not contain SHA1HEADER.

-----
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 94, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 381, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd,
self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 134, in doCommand
    return base.installPkgs(extcmds)
  File "/usr/share/yum-cli/cli.py", line 561, in installPkgs
    my_inst_pkgs = self.returnInstalledPackagesByDep(arg)
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 1595, in
returnInstalledPackagesByDep
    pkglist = self.rpmdb.whatProvides(depname, depflags, depver)
  File "/usr/lib/python2.4/site-packages/yum/rpmsack.py", line 390, in whatProvides
    pkgs = self.searchProvides(name)
  File "/usr/lib/python2.4/site-packages/yum/rpmsack.py", line 141, in
searchProvides
    return self.searchPrco(name, 'provides')
  File "/usr/lib/python2.4/site-packages/yum/rpmsack.py", line 123, in searchPrco
    if not result.has_key(po.pkgid):
TypeError: list objects are unhashable
-----

Examples of such rpms:
- jdk-1_5_0_11-linux-amd64.rpm
  (from http://java.sun.com/javase/downloads/index_jdk5.jsp)
- opera-9.20-20070409.6-shared-qt.i386-en.rpm
  (from http://www.opera.com/download/)

yum 3.1.x untested, but appears to already have a fix - attached is a backport
of it which does fix it for me with 3.0.6.

Comment 1 Ville Skyttä 2007-05-13 18:52:03 UTC
Created attachment 154612 [details]
Tolerate packages without SHA1HEADER

Comment 2 Jeremy Katz 2007-05-14 18:43:06 UTC
Seems okay to me; Seth?

Comment 3 Seth Vidal 2007-05-14 19:13:21 UTC
It should look okay - you checked in that same patch to 3.1.X before :)

applying it and closing this upstream

thanks