From 2d8a864beab9d060120860062a78b7064ef4f1be Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 24 May 2007 03:54:56 +0000 Subject: [PATCH] Make PackageIndex.write() alphabetize the metadata keys. svn path=/main/trunk/; revision=6611 --- pym/portage/getbinpkg.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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]) -- 2.26.2