Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 98272 Details for
Bug 149134
Portage needs to handle invalid cache properly
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
catch a ValueError caused by corrupt cache
corrupt_cache.patch (text/plain), 639 bytes, created by
Zac Medico
on 2006-09-27 17:18:25 UTC
(
hide
)
Description:
catch a ValueError caused by corrupt cache
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2006-09-27 17:18:25 UTC
Size:
639 bytes
patch
obsolete
>Index: pym/cache/flat_hash.py >=================================================================== >--- pym/cache/flat_hash.py (revision 4544) >+++ pym/cache/flat_hash.py (revision 4545) >@@ -36,7 +36,11 @@ > raise KeyError(cpv) > > def _parse_data(self, data, cpv): >- d = dict(map(lambda x:x.rstrip().split("=", 1), data)) >+ try: >+ d = dict(map(lambda x:x.rstrip("\n").split("=", 1), data)) >+ except ValueError, e: >+ # If a line is missing an "=", the split length is 1 instead of 2. >+ raise cache_errors.CacheCorruption(cpv, e) > if "_eclasses_" in d: > d["_eclasses_"] = reconstruct_eclasses(cpv, d["_eclasses_"]) > return d
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 149134
:
98092
| 98272