From bf8e88f8e7ec66a476eb0e2bf9eeca763a7546e1 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 24 May 2007 05:49:44 +0000 Subject: [PATCH] Make PackageIndex.write() omit USE when appropriate. svn path=/main/trunk/; revision=6613 --- pym/portage/getbinpkg.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pym/portage/getbinpkg.py b/pym/portage/getbinpkg.py index 47413259b..76016e3c0 100644 --- a/pym/portage/getbinpkg.py +++ b/pym/portage/getbinpkg.py @@ -619,10 +619,11 @@ class PackageIndex(object): 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() + metadata = self.packages[cpv].copy() + if metadata.get("SLOT") == "0": del metadata["SLOT"] + if metadata.get("USE") == "": + del metadata["USE"] keys = metadata.keys() keys.sort() writepkgindex(pkgfile, [(k, metadata[k]) for k in keys]) -- 2.26.2