Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 229533 - portage works with cPickle only, but not with fallback pickle
Summary: portage works with cPickle only, but not with fallback pickle
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: x86 Interix
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-26 11:46 UTC by Markus Duft (RETIRED)
Modified: 2008-07-31 07:43 UTC (History)
0 users

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 Duft (RETIRED) gentoo-dev 2008-06-26 11:46:11 UTC
Since a few revisions i saw that portage is not working with pickle anymore, but only with cPickle (which formerly didn't build on interix, now it's working, but still i feel this is a bug).

i get the following exception if cPickle is not there:

Calculating dependencies |Traceback (most recent call last):
  File "/opt/gentoo/usr/bin/emerge", line 20, in <module>
    retval = _emerge.emerge_main()
  File "/opt/gentoo/usr/lib/portage/pym/_emerge/__init__.py", line 9525, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/opt/gentoo/usr/lib/portage/pym/_emerge/__init__.py", line 8561, in action_build
    success = mydepgraph.loadResumeCommand(mtimedb["resume"])
  File "/opt/gentoo/usr/lib/portage/pym/_emerge/__init__.py", line 5484, in loadResumeCommand
    self.altlist()
  File "/opt/gentoo/usr/lib/portage/pym/_emerge/__init__.py", line 3850, in altlist
    self._resolve_conflicts()
  File "/opt/gentoo/usr/lib/portage/pym/_emerge/__init__.py", line 3865, in _resolve_conflicts
    if not self.validate_blockers():
  File "/opt/gentoo/usr/lib/portage/pym/_emerge/__init__.py", line 3545, in validate_blockers
    blocker_cache = BlockerCache(myroot, vardb)
  File "/opt/gentoo/usr/lib/portage/pym/_emerge/__init__.py", line 1522, in __init__
    self._load()
  File "/opt/gentoo/usr/lib/portage/pym/_emerge/__init__.py", line 1529, in _load
    self._cache_data = mypickle.load()
  File "/opt/gentoo/usr/lib/python2.5/pickle.py", line 858, in load
    dispatch[key](self)
  File "/opt/gentoo/usr/lib/python2.5/pickle.py", line 1224, in load_build
    inst.__dict__.update(state)
AttributeError: 'Atom' object has no attribute '__dict__'
Comment 1 Fabian Groffen gentoo-dev 2008-06-26 12:25:50 UTC
Thinking about this, maybe you should have (inter)rev-bumped python when you fixed cPickle for Interix.  How can Portage know it's not implemented but lateron fixed?  IIRC Portage pushes python before itself, such that this shouldn't be a problem.
Comment 2 Markus Duft (RETIRED) gentoo-dev 2008-06-26 12:44:50 UTC
hmm... it came in handy that there was a revbump somewhere before i tried this on my prefixes, so -r5 was shiny, new, and not merged :) portage didn't merge python before itself, but wanted to put it in somewhere later on, which of course was not such a good idea, since then portage was broken because of missing cPickle
Comment 3 Fabian Groffen gentoo-dev 2008-06-26 12:51:25 UTC
That coincidence was indeed nice.  What portage version were you updating from?  My own Interix install had a portage version that didn't push portage to the top of the list.  That has been changed again.
Comment 4 Fabian Groffen gentoo-dev 2008-06-26 12:53:34 UTC
ok, not:

Calculating dependencies... done!                                               
                                                                                
[ebuild     U ] sys-apps/portage-2.2.00.10788 [2.2.00.10770]                    
*** Portage will stop merging at this point and reload itself,                  
    then resume the merge.                                                      
[ebuild     U ] app-admin/python-updater-0.5 [0.4]                              
[ebuild  N    ] virtual/editor-0                                                
[ebuild  N    ] virtual/pager-0                                                 
[ebuild     U ] dev-lang/python-2.5.2-r5 [2.5.2-r4]

Back to the original bug then.
Comment 5 Zac Medico gentoo-dev 2008-06-26 20:02:21 UTC
(In reply to comment #0)
>   File "/opt/gentoo/usr/lib/python2.5/pickle.py", line 1224, in load_build
>     inst.__dict__.update(state)
> AttributeError: 'Atom' object has no attribute '__dict__'

Atom instances aren't supposed to be stored in the mtimedb anyway. They're supposed to be converted to plain str objects first. However, there were some versions of portage which did store Atom instances in the mtimedb, and that may have corrupted the mtimedb. To correct the problem, you should be able to simply remove the corrupt /var/cache/edb/mtimedb file.
Comment 6 Markus Duft (RETIRED) gentoo-dev 2008-07-31 07:14:13 UTC
hmm... i'm not having any problems with this anymore, so if you want you can close it. (i'm using cPickle now though, so i don't know if pickle.py is a problem).
Comment 7 Zac Medico gentoo-dev 2008-07-31 07:43:08 UTC
Here's the revision where the mtimedb code got fixed so that it would store normal string instances instead of Atom instances:

http://sources.gentoo.org/viewcvs.py/portage?view=rev&rev=10431