Bug 239974 - yum traceback when package has no SHA1HEADER
Summary: yum traceback when package has no SHA1HEADER
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 6
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
Keywords: Patch
Depends On:
TreeView+ depends on / blocked
Reported: 2007-05-13 18:52 UTC by Ville Skyttä
Modified: 2014-01-21 22:58 UTC (History)
0 users

Clone Of:
Last Closed: 2007-05-14 19:13:21 UTC

Attachments (Terms of Use)
Tolerate packages without SHA1HEADER (725 bytes, patch)
2007-05-13 18:52 UTC, Ville Skyttä
no flags Details | Diff

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 ?
  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,
  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
    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
    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


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