diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-12-09 22:23:04 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-12-09 22:23:04 -0800 |
commit | 1a171bdd8936fb3b5291dc143e141dfebcee8d9f (patch) | |
tree | 07c6b4de54bc7e38cba42f3e322ccfdc8dbdc770 /pym/portage | |
parent | b8a22d672a309976fcdc856269921a32414fdac5 (diff) | |
download | portage-1a171bdd8936fb3b5291dc143e141dfebcee8d9f.tar.gz portage-1a171bdd8936fb3b5291dc143e141dfebcee8d9f.tar.bz2 portage-1a171bdd8936fb3b5291dc143e141dfebcee8d9f.zip |
create_trees: add public eprefix parameter
Diffstat (limited to 'pym/portage')
-rw-r--r-- | pym/portage/__init__.py | 7 | ||||
-rw-r--r-- | pym/portage/tests/resolver/ResolverPlayground.py | 3 |
2 files changed, 4 insertions, 6 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 5a1866ff1..1df956633 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -486,7 +486,8 @@ class _trees_dict(dict): self._running_eroot = None self._target_eroot = None -def create_trees(config_root=None, target_root=None, trees=None, env=None): +def create_trees(config_root=None, target_root=None, trees=None, env=None, + eprefix=portage.const.EPREFIX): if trees is not None: # clean up any existing portdbapi instances for myroot in trees: @@ -504,9 +505,7 @@ def create_trees(config_root=None, target_root=None, trees=None, env=None): if env is None: env = os.environ - eprefix = env.get("__PORTAGE_TEST_EPREFIX") - if eprefix is None: - eprefix = portage.const.EPREFIX + settings = config(config_root=config_root, target_root=target_root, env=env, eprefix=eprefix) settings.lock() diff --git a/pym/portage/tests/resolver/ResolverPlayground.py b/pym/portage/tests/resolver/ResolverPlayground.py index 1a752be8d..cbf42efc3 100644 --- a/pym/portage/tests/resolver/ResolverPlayground.py +++ b/pym/portage/tests/resolver/ResolverPlayground.py @@ -475,7 +475,6 @@ class ResolverPlayground(object): portdir_overlay.append(path) env = { - "__PORTAGE_TEST_EPREFIX": self.eprefix, "ACCEPT_KEYWORDS": "x86", "DISTDIR" : self.distdir, "PKGDIR": os.path.join(self.eroot, "usr/portage/packages"), @@ -491,7 +490,7 @@ class ResolverPlayground(object): if 'PORTAGE_GRPNAME' in os.environ: env['PORTAGE_GRPNAME'] = os.environ['PORTAGE_GRPNAME'] - trees = portage.create_trees(env=env) + trees = portage.create_trees(env=env, eprefix=self.eprefix) for root, root_trees in trees.items(): settings = root_trees["vartree"].settings settings._init_dirs() |