diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-05-24 05:49:44 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-05-24 05:49:44 +0000 |
commit | bf8e88f8e7ec66a476eb0e2bf9eeca763a7546e1 (patch) | |
tree | 14cd863a662d52325f43e76073d1dec738172962 | |
parent | ab88c1afa60231559b51211f6bb8fea8e80d7352 (diff) | |
download | portage-bf8e88f8e7ec66a476eb0e2bf9eeca763a7546e1.tar.gz portage-bf8e88f8e7ec66a476eb0e2bf9eeca763a7546e1.tar.bz2 portage-bf8e88f8e7ec66a476eb0e2bf9eeca763a7546e1.zip |
Make PackageIndex.write() omit USE when appropriate.
svn path=/main/trunk/; revision=6613
-rw-r--r-- | pym/portage/getbinpkg.py | 7 |
1 files 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]) |