diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-07-27 14:23:34 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-07-27 14:23:34 +0000 |
commit | 2ab7c2f4d0708b33f07446b759a02e5f08f7e8a2 (patch) | |
tree | 8eb0924d9915e459c75a662ff810741ba6a3e6f1 | |
parent | aa15943a1feb5a4c895efb87e8f22f59daa6a11f (diff) | |
download | portage-2ab7c2f4d0708b33f07446b759a02e5f08f7e8a2.tar.gz portage-2ab7c2f4d0708b33f07446b759a02e5f08f7e8a2.tar.bz2 portage-2ab7c2f4d0708b33f07446b759a02e5f08f7e8a2.zip |
Fix EbuildFetcher to pass all config variables to the fetcher so things
like http_proxy are included.
svn path=/main/trunk/; revision=11223
-rw-r--r-- | pym/_emerge/__init__.py | 8 | ||||
-rw-r--r-- | pym/portage/__init__.py | 7 |
2 files changed, 8 insertions, 7 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index a7d0c5c67..877d64179 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -2217,8 +2217,6 @@ class EbuildFetcher(SpawnProcess): __slots__ = ("fetchonly", "pkg",) - _env_vars = ("FETCHCOMMAND", "GENTOO_MIRRORS", "RESUMECOMMAND") - def _start(self): root_config = self.pkg.root_config @@ -2226,12 +2224,8 @@ class EbuildFetcher(SpawnProcess): ebuild_path = portdb.findname(self.pkg.cpv) settings = root_config.settings - fetch_env = settings.environ() + fetch_env = dict(settings.iteritems()) fetch_env["PORTAGE_NICENESS"] = "0" - for k in self._env_vars: - v = settings.get(k) - if v is not None: - fetch_env[k] = v if self.fetchonly: fetch_env["PORTAGE_PARALLEL_FETCHONLY"] = "1" diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index e4fe13eed..f17b8e8a6 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -2798,6 +2798,13 @@ class config(object): def iterkeys(self): return iter(self) + def iteritems(self): + for k in self: + yield (k, self[k]) + + def items(self): + return list(self.iteritems()) + def __setitem__(self,mykey,myvalue): "set a value; will be thrown away at reset() time" if not isinstance(myvalue, str): |