Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Metadata cache corrupt?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
dev-urandom
Apprentice
Apprentice


Joined: 24 Jun 2005
Posts: 260
Location: Huh?

PostPosted: Thu Dec 07, 2006 9:17 pm    Post subject: Metadata cache corrupt? Reply with quote

This is what I got while syncing up sources with the standard rsync mirror (134.68.220.97 was the one that I got)

Code:
>>> Updating Portage cache:   84%Traceback (most recent call last):
  File "/usr/bin/emerge", line 4049, in ?
    emerge_main()
  File "/usr/bin/emerge", line 4006, in emerge_main
    action_sync(settings, trees, mtimedb, myopts, myaction)
  File "/usr/bin/emerge", line 2924, in action_sync
    action_metadata(settings, portdb, myopts)
  File "/usr/bin/emerge", line 3019, in action_metadata
    eclass_cache=ec, verbose_instance=noise_maker)
  File "/usr/lib/portage/pym/cache/util.py", line 47, in mirror_cache
    if trg and not write_it:
  File "/usr/lib64/python2.4/UserDict.py", line 170, in __len__
    return len(self.keys())
  File "/usr/lib/portage/pym/cache/mappings.py", line 54, in keys
    return list(self.__iter__())
  File "/usr/lib/portage/pym/cache/mappings.py", line 48, in __iter__
    for k in self.orig.iterkeys():
  File "/usr/lib64/python2.4/UserDict.py", line 103, in iterkeys
    return self.__iter__()
  File "/usr/lib/portage/pym/cache/mappings.py", line 83, in __iter__
    return iter(self.keys())
  File "/usr/lib/portage/pym/cache/mappings.py", line 87, in keys
    self.d.update(self.pull())
  File "/usr/lib/portage/pym/cache/flat_hash.py", line 29, in callit
    return args[0](*args[1:]+args2)
  File "/usr/lib/portage/pym/cache/flat_hash.py", line 44, in _pull
    d = self._parse_data(myf, cpv)
  File "/usr/lib/portage/pym/cache/flat_hash.py", line 57, in _parse_data
    d["_eclasses_"] = reconstruct_eclasses(cpv, d["_eclasses_"])
  File "/usr/lib/portage/pym/cache/template.py", line 168, in reconstruct_eclasses
    raise cache_errors.CacheCorruption(cpv, "_eclasses_ was of invalid len %i" % len(eclasses))
cache.cache_errors.CacheCorruption: sys-apps/pcmcia-cs-3.2.8-r2 is corrupt: _eclasses_ was of invalid len 20


I've removed /usr/portage/metadata/cache/sys-apps/pcmcia-cs-3.2.8-r2 and I am right now doing a emerge --metadata but I am wondering whether I am the only one seeing this problem.

EDIT: This worked fine after removing sys-apps/pcmcia-cs-3.2.8-r2, but that's a workaround at best.
_________________
/earth: file system full.
Back to top
View user's profile Send private message
DocReedSolomon
Guru
Guru


Joined: 28 Aug 2006
Posts: 419

PostPosted: Thu Dec 07, 2006 11:53 pm    Post subject: Reply with quote

if you upgraded portage (emerge portage) it is recommended to run "emerge --metadata" after "emerge --sync".
deleting files manually shouldnt be needed at all.

looks like you didnt emerge portage (the portage ebuild that is) and didnt emerge sync since a long while, coiuld that be?
Back to top
View user's profile Send private message
jstead1
Guru
Guru


Joined: 01 Aug 2003
Posts: 427
Location: Oswego, NY where the snow is deep

PostPosted: Fri Dec 08, 2006 12:17 am    Post subject: Reply with quote

I am getting similar errors.
The package changed once or twice.
Oddly, it always happens when Updating Portage cache is at 87%

ps
saw a possible solution here
https://forums.gentoo.org/viewtopic-t-520108-highlight-portage+cache+corrupt.html

I'll give it a try, although my system is rarely more than a week out of date.

pps
Code:
rm -r /var/cache/edb/dep/*  && emerge --metadata

fixed it for me.

Quite a few posts on this. Probably some mirror was corrupted.
_________________
jim
Back to top
View user's profile Send private message
dev-urandom
Apprentice
Apprentice


Joined: 24 Jun 2005
Posts: 260
Location: Huh?

PostPosted: Fri Dec 08, 2006 7:54 am    Post subject: Reply with quote

DocReedSolomon wrote:
if you upgraded portage (emerge portage) it is recommended to run "emerge --metadata" after "emerge --sync".
deleting files manually shouldnt be needed at all.

looks like you didnt emerge portage (the portage ebuild that is) and didnt emerge sync since a long while, coiuld that be?


Strange, I sync every friday as part of a cron job and over the weekend I emerge all the updates. I am not sure where the problem was, but pcmcia is the last thing i need on my desktop ;)

jstead1 wrote:
Oddly, it always happens when Updating Portage cache is at 87%

Exactly! Mine stopped at 88%.
_________________
/earth: file system full.
Back to top
View user's profile Send private message
x22
Apprentice
Apprentice


Joined: 24 Apr 2006
Posts: 208

PostPosted: Fri Dec 08, 2006 8:31 am    Post subject: Reply with quote

emerge --metadata updates /var/cache/edb/dep, not /usr/portage/metadata. This is "Updating Portage cache".
emerge --matadata is normally done during emerge --sync automatically. (Manual emerge --metadata is required when you share /usr/portage between multiple systems.)

/usr/portage/metadata is updated by emerge --sync (or emerge --regen, but --sync is the standard way).
Back to top
View user's profile Send private message
dev-urandom
Apprentice
Apprentice


Joined: 24 Jun 2005
Posts: 260
Location: Huh?

PostPosted: Fri Dec 08, 2006 8:34 am    Post subject: Reply with quote

x22 wrote:
emerge --metadata updates /var/cache/edb/dep, not /usr/portage/metadata. This is "Updating Portage cache".
emerge --matadata is normally done during emerge --sync automatically. (Manual emerge --metadata is required when you share /usr/portage between multiple systems.)

/usr/portage/metadata is updated by emerge --sync (or emerge --regen, but --sync is the standard way).


True, and the point is that there was a corrupt/incorrect file inside /usr/portage/metadata which was pushed by one of the rsync servers. I removed it since I had no need for it, and emerged my local metadata cache (emerge --metadata)
_________________
/earth: file system full.
Back to top
View user's profile Send private message
kallamej
Administrator
Administrator


Joined: 27 Jun 2003
Posts: 4830
Location: Gothenburg, Sweden

PostPosted: Sat Feb 10, 2007 11:28 am    Post subject: Reply with quote

Moved from Portage & Programming to Duplicate Threads in favour of topic 466613.
_________________
Please read our FAQ Forum, it answers many of your questions.
irc: #gentoo-forums on irc.freenode.net
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads 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