From: Zac Medico Date: Thu, 24 May 2007 03:54:56 +0000 (-0000) Subject: Make PackageIndex.write() alphabetize the metadata keys. X-Git-Tag: v2.2_pre1~1377 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2d8a864beab9d060120860062a78b7064ef4f1be;p=portage.git Make PackageIndex.write() alphabetize the metadata keys. svn path=/main/trunk/; revision=6611 --- diff --git a/pym/portage/getbinpkg.py b/pym/portage/getbinpkg.py index f21dce364..47413259b 100644 --- a/pym/portage/getbinpkg.py +++ b/pym/portage/getbinpkg.py @@ -615,10 +615,14 @@ class PackageIndex(object): import time self.header["TIMESTAMP"] = str(long(time.time())) self.header["PACKAGES"] = str(len(cpv_all)) - writepkgindex(pkgfile, self.header.iteritems()) + keys = self.header.keys() + keys.sort() + writepkgindex(pkgfile, [(k, self.header[k]) for k in keys]) for cpv in cpv_all: metadata = self.packages[cpv] if metadata["SLOT"] == "0": metadata = metadata.copy() del metadata["SLOT"] - writepkgindex(pkgfile, metadata.iteritems()) + keys = metadata.keys() + keys.sort() + writepkgindex(pkgfile, [(k, metadata[k]) for k in keys])