Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
upgrading python from 2.3.5-r2 to 2.4.1-r1 broke some things
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Autie
Guru
Guru


Joined: 25 Jul 2003
Posts: 309
Location: Ledegem - Belgium

PostPosted: Sat Oct 08, 2005 11:09 pm    Post subject: upgrading python from 2.3.5-r2 to 2.4.1-r1 broke some things Reply with quote

After the upgrade, things seems broken:
Code:
python-updater
Traceback (most recent call last):
  File "/usr/bin/portageq", line 10, in ?
    import portage,types,string
  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
Traceback (most recent call last):
  File "/usr/bin/portageq", line 10, in ?
    import portage,types,string
  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
 * Unable to proceed. Can not find PORTDIR. Make sure the command:
 * 
 *   portageq portdir
 * 
 * returns a value. If it doesn't, make sure you have updated to
 * latest portage version.
 * 
 * Report bugs to http://bugs.gentoo.org/

next:
Code:
 portageq portdir
Traceback (most recent call last):
  File "/usr/bin/portageq", line 10, in ?
    import portage,types,string
  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

Anyone any idea how to fix this?
_________________
The capacity to learn is a gift; The ability to learn is a skill; The willingness to learn is a choice.
Back to top
View user's profile Send private message
WackyDoo
n00b
n00b


Joined: 16 Mar 2004
Posts: 44
Location: Ottawa

PostPosted: Sat Oct 08, 2005 11:35 pm    Post subject: Reply with quote

If you have installed the emerge cdb speedups posted to the forums try this:

Code:

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


then emerge python-cdb and run python-updater.
Back to top
View user's profile Send private message
seank
l33t
l33t


Joined: 08 Jul 2004
Posts: 686

PostPosted: Sun Oct 09, 2005 2:08 am    Post subject: Reply with quote

I suppose this is somewhat off topic, but is it alright to remove the old python after upgrading to 2.4? I noticed it just slotted them.

Thanks.
Back to top
View user's profile Send private message
Autie
Guru
Guru


Joined: 25 Jul 2003
Posts: 309
Location: Ledegem - Belgium

PostPosted: Sun Oct 09, 2005 7:43 am    Post subject: Reply with quote

WackyDoo
thanks alot.
Works ok again
_________________
The capacity to learn is a gift; The ability to learn is a skill; The willingness to learn is a choice.
Back to top
View user's profile Send private message
WladyX
Guru
Guru


Joined: 25 Nov 2004
Posts: 503
Location: Romania

PostPosted: Sun Oct 09, 2005 8:50 am    Post subject: Reply with quote

sean_micken wrote:
I suppose this is somewhat off topic, but is it alright to remove the old python after upgrading to 2.4? I noticed it just slotted them.

Thanks.


I would also like to know that, but my guess is that it would be ok.
_________________
We are not alone.
Back to top
View user's profile Send private message
Sir No
Apprentice
Apprentice


Joined: 01 May 2005
Posts: 159
Location: Poland

PostPosted: Mon Oct 10, 2005 10:59 am    Post subject: Reply with quote

For discussion on how to remove python-2.3.5 in favor of 2.4.1 see this topic.

I'm currently in the process of upgrading python (it's compiling) and I hope to remove the previous version using the above instructions. Probably all should be fine. And in the case of something there are always forums and bugzilla ;)

EDIT:
Yup. Everything went correctly. The new python ebuild even notified me about what should be done.
Smooth :)
_________________
The geeks | Recommended Packages fOr Desktop & Server | Read BBCode Guide!


Last edited by Sir No on Thu Oct 13, 2005 12:22 am; edited 1 time in total
Back to top
View user's profile Send private message
benu
n00b
n00b


Joined: 28 Oct 2003
Posts: 18

PostPosted: Tue Oct 11, 2005 11:23 am    Post subject: Reply with quote

Python-upgrade did not work for me, and portage was broken after that. I had to recompile python-cdb like this: /usr/bin/python2.3 /usr/bin/emerge -v dev-python/python-cdb
Now everything seems to work again. Just in case anyone has the same problem...
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6053
Location: Removed by Neddy

PostPosted: Tue Oct 11, 2005 11:44 am    Post subject: Reply with quote

you do know that there is a "python-updater" script that will scan your old 2.3 site-package dir and see what is there and what isnt in the 2.4 site-package dir and automatically emerge the relevant packages

so again

python-updater

should be used at a major-number upgrade for python, it will next be needed at the 2.4 -> 2.5 step (but that is a long way off)
_________________
Quote:
Removed by Chiitoo
Back to top
View user's profile Send private message
stdPikachu
Apprentice
Apprentice


Joined: 10 Mar 2004
Posts: 254
Location: UK

PostPosted: Tue Oct 11, 2005 4:12 pm    Post subject: Reply with quote

Kinda OT, but I was also semi-b0rk3d by the Python upgrade - namely PyQt wouldn't work any more, and I couldn't re-emerge it due to the module "sipconfig" not being found. I had to re-emerge dev-python/sip before I could rebuild PyQt.
Back to top
View user's profile Send private message
JSharku
Apprentice
Apprentice


Joined: 09 Feb 2003
Posts: 189
Location: Belgium

PostPosted: Tue Oct 11, 2005 4:49 pm    Post subject: Reply with quote

Naib wrote:
you do know that there is a "python-updater" script that will scan your old 2.3 site-package dir and see what is there and what isnt in the 2.4 site-package dir and automatically emerge the relevant packages

so again

python-updater

should be used at a major-number upgrade for python, it will next be needed at the 2.4 -> 2.5 step (but that is a long way off)


If you look at the code segment, you'll see the OP was trying to run python-updater which gave him the error messages:
Code:
python-updater
Traceback (most recent call last):
  File "/usr/bin/portageq", line 10, in ?
    import portage,types,string
...


Sharku
_________________
If only life were portage-driven:
Code:
USE="-bitch -in-laws nice gorgeous smart" emerge girlfriend
*sigh*
--
Open Source for Windows!
Back to top
View user's profile Send private message
jnicol
n00b
n00b


Joined: 29 Jan 2003
Posts: 73
Location: Seattle, WA

PostPosted: Fri Oct 14, 2005 5:11 am    Post subject: Reply with quote

Dude, you rule.

WackyDoo wrote:
If you have installed the emerge cdb speedups posted to the forums try this:

Code:

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


then emerge python-cdb and run python-updater.
Back to top
View user's profile Send private message
wackman2k1
n00b
n00b


Joined: 22 Sep 2003
Posts: 45

PostPosted: Tue Oct 18, 2005 5:48 am    Post subject: Reply with quote

I have to second that emotion, you deffinitely do rock. My portage was broken, python-updater wouldn't work and I was told to run portageq portdir which didn't work due to an update python. This fixed me. Thanks again.
_________________
As of October 2009:

Athlon II X4 920 (a quad core for $99!)
4GB DDR2 RAM (2 gigs of 667 on one channel - 2 gigs of 800 on another)
Asus M4A78-E
AMD 790GX chipset
ATI Radeon 4850 512 MB
Back to top
View user's profile Send private message
kedalel
n00b
n00b


Joined: 30 Aug 2004
Posts: 74
Location: Belgium

PostPosted: Tue Oct 18, 2005 8:13 pm    Post subject: Reply with quote

I had the same problem... but
/usr/lib/portage/pym/ was /usr/lib/portage/py^/ (i don't know why :roll: ) .. rename and it is ok
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum