Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 149134 - Portage needs to handle invalid cache properly
Summary: Portage needs to handle invalid cache properly
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
: 149360 (view as bug list)
Depends on:
Blocks: 147007
  Show dependency tree
 
Reported: 2006-09-25 21:41 UTC by Doug Goldstein (RETIRED)
Modified: 2006-09-29 16:49 UTC (History)
1 user (show)

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


Attachments
bad cache file (gnupg-1.4.2-r1,1.09 KB, text/plain)
2006-09-25 21:42 UTC, Doug Goldstein (RETIRED)
Details
catch a ValueError caused by corrupt cache (corrupt_cache.patch,639 bytes, patch)
2006-09-27 17:18 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Goldstein (RETIRED) gentoo-dev 2006-09-25 21:41:44 UTC
I just updated to sys-apps/portage-2.1.2_pre1-r2. And repoman broke for me with the following backtrace:

Traceback (most recent call last):
  File "/usr/bin/repoman", line 1180, in ?
    trees=trees)
  File "/usr/lib/portage/pym/portage.py", line 3550, in dep_check
    mysplit2=dep_wordreduce(mysplit2,mysettings,mydbapi,mode,use_cache=use_cache)
  File "/usr/lib/portage/pym/portage.py", line 3587, in dep_wordreduce
    mydep=mydbapi.xmatch(mode,deplist[mypos])
  File "/usr/lib/portage/pym/portage.py", line 5146, in xmatch
    myval=match_from_list(mydep,self.xmatch("list-visible",None,mydep=mydep,mykey=mykey))
  File "/usr/lib/portage/pym/portage.py", line 5132, in xmatch
    myval=self.gvisible(self.visible(self.cp_list(mykey)))
  File "/usr/lib/portage/pym/portage.py", line 5231, in gvisible
    keys, eapi = self.aux_get(mycpv, ["KEYWORDS", "EAPI"])
  File "/usr/lib/portage/pym/portage.py", line 4846, in aux_get
    mydata = self.auxdb[mylocation][mycpv]
  File "/usr/lib/portage/pym/cache/flat_hash.py", line 28, in __getitem__
    d = self._parse_data(myf, cpv)
  File "/usr/lib/portage/pym/cache/flat_hash.py", line 40, in _parse_data
    d = dict(map(lambda x:x.rstrip().split("=", 1), data))
ValueError: dictionary update sequence element #0 has length 1; 2 is required


jstubbs had me add a print statement in there and it was from /var/cache/edb/dep/home/cardoe/workspace/gentoo-x86/app-crypt/gnupg-1.4.2-r1 which is my CVS (which isn't in PORTDIR_OVERLAY by default) and I'll attach the file here.
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2006-09-25 21:42:17 UTC
Created attachment 98092 [details]
bad cache file
Comment 2 Zac Medico gentoo-dev 2006-09-27 16:47:32 UTC
*** Bug 149360 has been marked as a duplicate of this bug. ***
Comment 3 Zac Medico gentoo-dev 2006-09-27 17:18:25 UTC
Created attachment 98272 [details, diff]
catch a ValueError caused by corrupt cache

This is fixed in svn r4545.
Comment 4 Zac Medico gentoo-dev 2006-09-29 16:49:28 UTC
This has been released in 2.1.2_pre2.