Bug 464378 - Yum has stopped working, along with pirut
Yum has stopped working, along with pirut
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
i386 Linux
medium Severity urgent
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-09-27 19:34 EDT by Anant Sahai
Modified: 2014-01-21 18:06 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-11-07 13:48:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
The save from the bug (2.61 KB, text/plain)
2008-09-27 19:34 EDT, Anant Sahai
no flags Details

  None (edit)
Description Anant Sahai 2008-09-27 19:34:26 EDT
Created attachment 317876 [details]
The save from the bug

Description of problem:
yum no longer installs updates, neither does pirut.

Instead, it crashes and asks us to submit a bug report

Version-Release number of selected component (if applicable):

3.2.19 release 3.fc8

How reproducible:


Steps to Reproduce:
1. yum update
Actual results:

Loaded plugins: dellsysidplugin
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package yelp.i386 0:2.20.0-13.fc8 set to be updated
---> Package gnome-python2-extras.i386 0:2.19.1-17.fc8 set to be updated
---> Package NetworkManager-vpnc.i386 1:0.7.0-0.10.svn4024.fc8 set to be updated
--> Processing Dependency: NetworkManager >= 1:0.7.0-0.11.svn4022 for package: NetworkManager-vpnc
---> Package NetworkManager-gnome.i386 1:0.7.0-0.11.svn4022.fc8 set to be updated
---> Package NetworkManager-openvpn.i386 1:0.7.0-15.svn4027.fc8 set to be updated
---> Package gnome-python2-gtkhtml2.i386 0:2.19.1-17.fc8 set to be updated
---> Package firefox-devel.i386 0: set to be updated
---> Package foomatic.i386 0:3.0.2-67.fc8 set to be updated
---> Package gnome-python2-libegg.i386 0:2.19.1-17.fc8 set to be updated
---> Package devhelp.i386 0:0.16.1-10.fc8 set to be updated
---> Package firefox.i386 0: set to be updated
---> Package NetworkManager-glib.i386 1:0.7.0-0.11.svn4022.fc8 set to be updated
--> Running transaction check
---> Package NetworkManager.i386 1:0.7.0-0.11.svn4022.fc8 set to be updated
--> Processing Dependency: dnsmasq for package: NetworkManager
--> Processing Dependency: avahi-autoipd for package: NetworkManager
--> Running transaction check
---> Package avahi-autoipd.i386 0:0.6.21-8.fc8 set to be updated
---> Package dnsmasq.i386 0:2.40-1.fc8 set to be updated
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 229, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 145, in main
    (result, resultmsgs) = base.buildTransaction() 
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 641, in buildTransaction
    (rescode, restring) = self.resolveDeps()
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 696, in resolveDeps
    for po, dep in self._checkFileRequires():
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 931, in _checkFileRequires
    if not self.tsInfo.getOldProvides(filename) and not self.tsInfo.getNewProvides(filename):
  File "/usr/lib/python2.5/site-packages/yum/transactioninfo.py", line 414, in getNewProvides
    for pkg, hits in self.pkgSack.getProvides(name, flag, version).iteritems():
  File "/usr/lib/python2.5/site-packages/yum/packageSack.py", line 300, in getProvides
    return self._computeAggregateDictResult("getProvides", name, flags, version)
  File "/usr/lib/python2.5/site-packages/yum/packageSack.py", line 470, in _computeAggregateDictResult
    sackResult = apply(method, args)
  File "/usr/lib/python2.5/site-packages/yum/sqlitesack.py", line 857, in getProvides
    return self._search("provides", name, flags, version)
  File "/usr/lib/python2.5/site-packages/yum/sqlitesack.py", line 43, in newFunc
    return func(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/yum/sqlitesack.py", line 833, in _search
    for pkg in self.searchFiles(name, strict=True):
  File "/usr/lib/python2.5/site-packages/yum/sqlitesack.py", line 43, in newFunc
    return func(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/yum/sqlitesack.py", line 566, in searchFiles
    self._sql_pkgKey2po(rep, cur, pkgs)
  File "/usr/lib/python2.5/site-packages/yum/sqlitesack.py", line 468, in _sql_pkgKey2po
    pkg = self._packageByKey(repo, ob['pkgKey'])
  File "/usr/lib/python2.5/site-packages/yum/sqlitesack.py", line 411, in _packageByKey
    po = self.pc(repo, cur.fetchone())
  File "/usr/lib/python2.5/site-packages/yum/sqlitesack.py", line 68, in __init__
  File "/usr/lib/python2.5/site-packages/yum/sqlitesack.py", line 94, in _read_db_obj
    setattr(self, item, _share_data(db_obj[item]))
TypeError: 'NoneType' object is unsubscriptable

Expected results:

A working update

Additional info:
Comment 1 James Antill 2008-10-02 09:19:37 EDT
 This looks like something is going wrong with downloading/using the filelists metadata ... can you provide the output for "yum repolist".
 Also try running: "yum clean metadata" and then see if it clears up.
Comment 2 Anant Sahai 2008-10-02 10:49:19 EDT
yum repolist:

[root@home ~]# yum repolist
Loaded plugins: dellsysidplugin
repo id              repo name                                status  
adobe-linux-i386     Adobe Systems Incorporated               enabled :      17
fedora               Fedora 8 - i386                          enabled :   8,439
livna                Livna for Fedora Core 8 - i386 - Base    enabled :   2,081
updates              Fedora 8 - i386 - Updates                enabled :       1
updates-newkey       Fedora 8 - i386 - Updates Newkey         enabled :   5,276
repolist: 15,814

[root@home ~]# yum clean metadata
Loaded plugins: dellsysidplugin
21 metadata files removed
9 sqlite files removed
0 metadata files removed

[root@home ~]# yum check-update
Loaded plugins: dellsysidplugin
livna                                                    | 2.1 kB     00:00     
primary.sqlite.bz2                                       | 487 kB     00:02     
fedora                                                   | 2.1 kB     00:00     
primary.sqlite.bz2                                       | 4.9 MB     00:16     
adobe-linux-i386                                         |  951 B     00:00     
primary.xml.gz                                           |  10 kB     00:00     
adobe-linux-i386                                               17/17
Could not retrieve mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f8.newkey&arch=i386 error was
[Errno 14] HTTP Error 404: Not Found
Error: Cannot retrieve repository metadata (repomd.xml) for repository: updates-newkey. Please verify its path and try again
Comment 3 Anant Sahai 2008-10-02 11:42:30 EDT
I manually downloaded primary.sqlite.bz2 and repomd.xml from http://mirrors.kernel.org/fedora/updates/8/i386.newkey/repodata/

[root@home updates-newkey]# yum check-update
Loaded plugins: dellsysidplugin
updates-newkey                                           | 2.3 kB     00:00     
Not using downloaded repomd.xml because it is older than what we have:
  Current   : Thu Oct  2 06:23:20 2008
  Downloaded: Wed Oct  1 13:39:01 2008
updates                                                  | 2.6 kB     00:00     
primary.sqlite.bz2                                       | 2.2 kB     00:00     

NetworkManager.i386                      1:0.7.0-0.11.svn4022.f updates-newkey  
NetworkManager-glib.i386                 1:0.7.0-0.11.svn4022.f updates-newkey  
NetworkManager-gnome.i386                1:0.7.0-0.11.svn4022.f updates-newkey  
NetworkManager-openvpn.i386              1:0.7.0-15.svn4027.fc8 updates-newkey  
NetworkManager-vpnc.i386                 1:0.7.0-0.10.svn4024.f updates-newkey  
devhelp.i386                             0.16.1-10.fc8          updates-newkey  
firefox.i386                            updates-newkey  
firefox-devel.i386                      updates-newkey  
foomatic.i386                            3.0.2-67.fc8           updates-newkey  
gecko-mediaplayer.i386                   0.8.0-1.lvn8           livna           
gnome-mplayer.i386                       0.8.0-1.lvn8           livna           
gnome-python2-extras.i386                2.19.1-17.fc8          updates-newkey  
gnome-python2-gtkhtml2.i386              2.19.1-17.fc8          updates-newkey  
gnome-python2-libegg.i386                2.19.1-17.fc8          updates-newkey  
kernel.i686                            updates-newkey  
kernel-devel.i686                      updates-newkey  
kernel-headers.i386                    updates-newkey  
yelp.i386                                2.20.0-13.fc8          updates-newkey  

pirut also seems to be working now along with yum... 

But such corruption should never occur and any such exception should be caught. So this is still a bug.
Comment 4 Pavel Alexeev 2008-10-23 18:41:40 EDT
I think this is relevant to this error:
# yum upgrade

Setting up Upgrade Process
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 229, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 104, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 339, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 536, in doCommand
    return base.updatePkgs(extcmds)
  File "/usr/share/yum-cli/cli.py", line 561, in updatePkgs
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 2466, in update
    updates = self.up.getUpdatesTuples()
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 604, in <lambda>
    up = property(fget=lambda self: self._getUpdates(),
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 495, in _getUpdates
    self._up.rawobsoletes = self.pkgSack.returnObsoletes(newest=True)
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 591, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 416, in _getSacks
    if self._pkgSack and thisrepo is None:
  File "/usr/lib/python2.5/site-packages/yum/packageSack.py", line 263, in __len__
    ret += len(sack)
ValueError: __len__() should return >= 0

If add --disablerepo='kde-testing-all' (find in experiments) it is work correctly.
Comment 5 Pavel Alexeev 2008-10-23 18:42:31 EDT
Excuse me. This is on Fedora 9
# rpm -q yum
Comment 6 seth vidal 2008-11-07 13:48:56 EST
If you do a yum clean all the problem goes away. Yum 3.2.20 which will be in updates-testing in f9 shortly and it is fixed in upstream

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