diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-10-25 16:47:54 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-10-25 16:47:54 +0000 |
commit | 24ed493f08c3b4096e7c15b4710b6e7819a16a3c (patch) | |
tree | 72bfa319c478022d2b12aa3f3910dc60b08cd5dd | |
parent | 5919e8578c68f8eda4ec2f446a66d4477117c288 (diff) | |
download | portage-24ed493f08c3b4096e7c15b4710b6e7819a16a3c.tar.gz portage-24ed493f08c3b4096e7c15b4710b6e7819a16a3c.tar.bz2 portage-24ed493f08c3b4096e7c15b4710b6e7819a16a3c.zip |
For the time being, write a variation of the old _eclass_ format so that cache written only forces a regen for older versions of portage rather than a ValueError due to failed long() conversion.
svn path=/main/trunk/; revision=4815
-rw-r--r-- | pym/cache/template.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pym/cache/template.py b/pym/cache/template.py index 1e3c9abe8..cce8e30a8 100644 --- a/pym/cache/template.py +++ b/pym/cache/template.py @@ -157,8 +157,18 @@ class database(object): def serialize_eclasses(eclass_dict): """takes a dict, returns a string representing said dict""" + """The "new format", which causes older versions of <portage-2.1.2 to + traceback with a ValueError due to failed long() conversion. This format + isn't currently written, but the the capability to read it is already built + in. return "\t".join(["%s\t%s" % (k, str(v)) \ for k, v in eclass_dict.iteritems()]) + """ + """ This is a variation of the old format that uses a relative path instead + of the full path of the eclass. It should only force a regen in older + versions of portage (rather than a traceback).""" + return "\t".join(["%s\teclass\t%s" % (k, str(v)) \ + for k, v in eclass_dict.iteritems()]) def reconstruct_eclasses(cpv, eclass_string): """returns a dict when handed a string generated by serialize_eclasses""" |