From 7e8e3c2c1337d333145b52cda55e6072f0244280 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 20 Jul 2006 09:08:42 +0000 Subject: Move initialization of config.uvlist into the regenerate() method since that's the only place it's used. svn path=/main/trunk/; revision=3969 --- pym/portage.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pym/portage.py b/pym/portage.py index 7c84d8bd5..f5c20b840 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -837,6 +837,7 @@ class config: self.mycpv = None self.puse = [] self.modifiedkeys = [] + self.uvlist = [] self.virtuals = {} self.virts_p = {} @@ -1225,15 +1226,6 @@ class config: self["PORTAGE_PYM_PATH"] = PORTAGE_PYM_PATH self.backup_changes("PORTAGE_PYM_PATH") - self.uvlist=[] - for x in self["USE_ORDER"].split(":"): - if self.configdict.has_key(x): - if "PKGUSE" in self.configdict[x].keys(): - del self.configdict[x]["PKGUSE"] # Delete PkgUse, Not legal to set. - #prepend db to list to get correct order - self.uvlist[0:0]=[self.configdict[x]] - - if clone is None: self.regenerate() self.features = portage_util.unique_array(self["FEATURES"].split()) @@ -1467,6 +1459,14 @@ class config: for mykey in myincrementals: if mykey=="USE": + if not self.uvlist: + for x in self["USE_ORDER"].split(":"): + if x in self.configdict: + try: + del self.configdict[x]["PKGUSE"] + except KeyError: + pass + self.uvlist.insert(0, self.configdict[x]) mydbs=self.uvlist if "auto" in self["USE_ORDER"].split(":"): self.configdict["auto"]["USE"] = autouse( -- cgit v1.2.3-1-g7c22