From bd8514843e2dac56c59a566b335c89d486ad894b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 9 Dec 2011 22:02:01 -0800 Subject: Use portage.const.EPREFIX more. --- bin/dispatch-conf | 2 +- bin/egencache | 2 +- bin/portageq | 2 +- bin/repoman | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/dispatch-conf b/bin/dispatch-conf index 1cad9e011..75e991189 100755 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@ -85,7 +85,7 @@ class dispatch: confs = [] count = 0 - config_root = os.environ.get("__PORTAGE_TEST_EPREFIX", "/") + config_root = portage.const.EPREFIX or os.sep self.options = portage.dispatch_conf.read_config(MANDATORY_OPTS) if "log-file" in self.options: diff --git a/bin/egencache b/bin/egencache index ba1f18873..532cc034c 100755 --- a/bin/egencache +++ b/bin/egencache @@ -841,7 +841,7 @@ def egencache_main(args): if options.portdir is not None: env['PORTDIR'] = options.portdir - eprefix = os.environ.get("__PORTAGE_TEST_EPREFIX") + eprefix = portage.const.EPREFIX settings = portage.config(config_root=config_root, local_config=False, env=env, _eprefix=eprefix) diff --git a/bin/portageq b/bin/portageq index e1cf1a0f7..5e488d340 100755 --- a/bin/portageq +++ b/bin/portageq @@ -842,7 +842,7 @@ def main(): sys.stderr.write("Run portageq with --help for info\n") sys.stderr.flush() sys.exit(os.EX_USAGE) - eprefix = os.environ.get("__PORTAGE_TEST_EPREFIX") + eprefix = portage.const.EPREFIX eroot = portage.util.normalize_path(sys.argv[2]) if eprefix: root = eroot[:1-len(eprefix)] diff --git a/bin/repoman b/bin/repoman index fc5000f7e..6ea15678d 100755 --- a/bin/repoman +++ b/bin/repoman @@ -95,7 +95,7 @@ os.umask(0o22) # behave incrementally. repoman_incrementals = tuple(x for x in \ portage.const.INCREMENTALS if x != 'ACCEPT_KEYWORDS') -eprefix = os.environ.get("__REPOMAN_TEST_EPREFIX") +eprefix = portage.const.EPREFIX repoman_settings = portage.config(local_config=False, _eprefix=eprefix) repoman_settings.lock() -- cgit v1.2.3-1-g7c22