Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 108966 - Portage attempts to load non-existant module cdb
Summary: Portage attempts to load non-existant module cdb
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Portage team
URL: http://gentoo-wiki.com/TIP_speed_up_p...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-11 23:33 UTC by markus
Modified: 2005-10-21 18:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description markus 2005-10-11 23:33:43 UTC
After the Portage update to 2.0.51.22-r3 emerge crashed with the following message.

>>> Regenerating /etc/ld.so.cache...
Traceback (most recent call last):
  File "/usr/lib/portage/bin/emerge", line 10, in ?
    import portage
  File "/usr/lib/portage/pym/portage.py", line 7140, in ?
    portdb=portdbapi(settings["PORTDIR"])
  File "/usr/lib/portage/pym/portage.py", line 5125, in __init__
    self.eclassdb = eclass_cache(self.porttree_root, self.mysettings)
  File "/usr/lib/portage/pym/portage.py", line 4968, in __init__
    self.dbmodule = self.settings.load_best_module("eclass_cache.dbmodule")
  File "/usr/lib/portage/pym/portage.py", line 1220, in load_best_module
    return load_mod(best_mod)
  File "/usr/lib/portage/pym/portage.py", line 139, in load_mod
    mod = __import__(modname)
  File "/usr/lib/portage/pym/portage_db_cdb.py", line 21, in ?
    import cdb
ImportError: No module named cdb


Reproducible: Couldn't Reproduce
Steps to Reproduce:
1.
2.
3.
Comment 1 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-10-12 00:31:36 UTC
It appears that portage_db_cdb.py is extra, it's not in any of my portage 
installs.  I would believe that that particular module is broken.  Try removing 
that file and see if it works out.  Do you have any idea where it came from?

If it's a third party module for some sort of cache speedup it's probably broken 
in r3.
Comment 2 Zac Medico gentoo-dev 2005-10-12 00:46:58 UTC
Apparently you unmerged dev-db/cdb and forgot what you were using it for (see
referenced url).  If you simply "rm /etc/portage/modules" then portage won't try
to load that module anymore.
Comment 3 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-10-12 01:53:56 UTC
Apparently I need to earn my Google Wings :/

Invalid as it's a 3rd party module.  Remerging cdb should fix the issue along 
with Zac's method.  If it isn't fixed by those, re-open.
Comment 4 Sophie Hamilton 2005-10-21 12:04:43 UTC
I want to add to this bug that I *do* use cdb, and I get exactly the same error now:

downstairs ~ # emerge -pvu world
Traceback (most recent call last):
  File "/usr/bin/emerge", line 10, in ?
    import portage
  File "/usr/lib/portage/pym/portage.py", line 7140, in ?
    portdb=portdbapi(settings["PORTDIR"])
  File "/usr/lib/portage/pym/portage.py", line 5125, in __init__
    self.eclassdb = eclass_cache(self.porttree_root, self.mysettings)
  File "/usr/lib/portage/pym/portage.py", line 4968, in __init__
    self.dbmodule = self.settings.load_best_module("eclass_cache.dbmodule")
  File "/usr/lib/portage/pym/portage.py", line 1220, in load_best_module
    return load_mod(best_mod)
  File "/usr/lib/portage/pym/portage.py", line 139, in load_mod
    mod = __import__(modname)
  File "/usr/lib/portage/pym/portage_db_cdb.py", line 21, in ?
    import cdb
ImportError: No module named cdb

This error is caused by the upgrade to Python 2.4. To fix this error, do:

cp /usr/lib/python2.3/site-packages/cdbmodule.so
/usr/lib/python2.4/site-packages/cdbmodule.so

Portage will then work again. To be safe, re-emerge dev-python/python-cdb
immediately afterwards.

Just wanted to give more info for people struggling with this. :)
Comment 5 Sophie Hamilton 2005-10-21 12:07:56 UTC
According to the forum thread at
http://forums.gentoo.org/viewtopic-t-389314.html , running python-updater after
the above would be a good idea too.
Comment 6 Brian Harring (RETIRED) gentoo-dev 2005-10-21 18:58:58 UTC
symlink, don't mv first off all..
second, python-updater. :)