From: Zac Medico Date: Fri, 21 Jul 2006 03:41:27 +0000 (-0000) Subject: Blacklist some variables in the config constructor so that they can't interfere with... X-Git-Tag: v2.1.1~168 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4a031c34483f749c68ad9ab66dfe8f4ce89275f5;p=portage.git Blacklist some variables in the config constructor so that they can't interfere with portage internals. svn path=/main/trunk/; revision=3973 --- diff --git a/pym/portage.py b/pym/portage.py index e3eed28ab..3659839b3 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -1076,6 +1076,15 @@ class config: self.lookuplist=self.configlist[:] self.lookuplist.reverse() + # Blacklist vars that could interfere with portage internals. + for blacklisted in ["PKGUSE", "PORTAGE_CONFIGROOT", "ROOT"]: + for cfg in self.lookuplist: + try: + del cfg[blacklisted] + except KeyError: + pass + del blacklisted, cfg + self["PORTAGE_CONFIGROOT"] = config_root self.backup_changes("PORTAGE_CONFIGROOT") self["ROOT"] = target_root @@ -1462,10 +1471,6 @@ class config: 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(":"):