diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-08-13 05:54:21 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-08-13 05:54:21 -0700 |
commit | 2084e692b0f36d7f3fe8f2c3a6cb8c540abcc665 (patch) | |
tree | 6812bd14d46bddc3de8b0db5b7555ef1bfd09e64 | |
parent | 0ccacd85137588bbf1ceb90e1d72be79daaf9e58 (diff) | |
download | portage-2084e692b0f36d7f3fe8f2c3a6cb8c540abcc665.tar.gz portage-2084e692b0f36d7f3fe8f2c3a6cb8c540abcc665.tar.bz2 portage-2084e692b0f36d7f3fe8f2c3a6cb8c540abcc665.zip |
config: blacklist vars loaded from profile.env
-rw-r--r-- | pym/portage/package/ebuild/config.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index a591c9ad7..8cca0ef25 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -208,6 +208,7 @@ class config(object): self.repositories = clone.repositories self._iuse_implicit_match = clone._iuse_implicit_match self._non_user_variables = clone._non_user_variables + self._env_d_blacklist = clone._env_d_blacklist self._repo_make_defaults = clone._repo_make_defaults self.usemask = clone.usemask self.useforce = clone.useforce @@ -439,6 +440,14 @@ class config(object): non_user_variables = frozenset(non_user_variables) self._non_user_variables = non_user_variables + self._env_d_blacklist = frozenset(chain( + profile_only_variables, + self._env_blacklist, + )) + env_d = self.configdict["env.d"] + for k in self._env_d_blacklist: + env_d.pop(k, None) + for k in profile_only_variables: self.mygcfg.pop(k, None) @@ -1702,6 +1711,8 @@ class config(object): env_d = getconfig(env_d_filename, expand=False) if env_d: # env_d will be None if profile.env doesn't exist. + for k in self._env_d_blacklist: + env_d.pop(k, None) self.configdict["env.d"].update(env_d) def regenerate(self, useonly=0, use_cache=None): |