summaryrefslogtreecommitdiffstats
path: root/bin/egencache
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-09-05 15:35:02 -0700
committerZac Medico <zmedico@gentoo.org>2011-09-05 15:35:02 -0700
commit41652a49cbd99ea129b36834faf5ba7508f3f617 (patch)
tree1d931dfedd3b433e338c35a06cdacb2648f5ffab /bin/egencache
parentc39406adff994d6483a08edf59c9bf6b84191f68 (diff)
downloadportage-41652a49cbd99ea129b36834faf5ba7508f3f617.tar.gz
portage-41652a49cbd99ea129b36834faf5ba7508f3f617.tar.bz2
portage-41652a49cbd99ea129b36834faf5ba7508f3f617.zip
tests/emerge: test egencache
This tests --update in any case, and --update-use-local-desc only if python xml support is detected.
Diffstat (limited to 'bin/egencache')
-rwxr-xr-xbin/egencache11
1 files changed, 4 insertions, 7 deletions
diff --git a/bin/egencache b/bin/egencache
index 53ae56582..bf29474ef 100755
--- a/bin/egencache
+++ b/bin/egencache
@@ -772,8 +772,6 @@ def egencache_main(args):
parser, options, atoms = parse_args(args)
config_root = options.config_root
- if config_root is None:
- config_root = '/'
# The calling environment is ignored, so the program is
# completely controlled by commandline arguments.
@@ -790,8 +788,10 @@ def egencache_main(args):
if options.portdir is not None:
env['PORTDIR'] = options.portdir
+ eprefix = os.environ.get("__PORTAGE_TEST_EPREFIX")
+
settings = portage.config(config_root=config_root,
- target_root='/', local_config=False, env=env)
+ local_config=False, env=env, _eprefix=eprefix)
default_opts = None
if not options.ignore_default_opts:
@@ -800,14 +800,11 @@ def egencache_main(args):
if default_opts:
parser, options, args = parse_args(default_opts + args)
- if options.config_root is not None:
- config_root = options.config_root
-
if options.cache_dir is not None:
env['PORTAGE_DEPCACHEDIR'] = options.cache_dir
settings = portage.config(config_root=config_root,
- target_root='/', local_config=False, env=env)
+ local_config=False, env=env, _eprefix=eprefix)
if not options.update and not options.update_use_local_desc \
and not options.update_changelogs: