From 78bfafb1f34f799124f4cf57b80fafa70bb11d90 Mon Sep 17 00:00:00 2001 From: XU Benda Date: Fri, 23 Dec 2011 15:31:53 +0900 Subject: [PATCH] do not let EPREFIX from environment to override portage.const.EPREFIX before building, load EPREFIX from environment this is only a dirty fix. not sure if it breaks prefix bootstrap there is a conflict for the handling of EPREFIX between master and prefix branches (and between zmedico and grobian). we should sit down and settle the scheme. --- pym/_emerge/actions.py | 4 +++- pym/portage/const.py | 6 ------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 025243d..571af50 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -3026,7 +3026,9 @@ def git_sync_timestamps(portdb, portdir): def load_emerge_config(trees=None): kwargs = {} - for k, envvar in (("config_root", "PORTAGE_CONFIGROOT"), ("target_root", "ROOT")): + for k, envvar in (("config_root", "PORTAGE_CONFIGROOT"), + ("target_root", "ROOT"), + ("eprefix", "EPREFIX")): v = os.environ.get(envvar, None) if v and v.strip(): kwargs[k] = v diff --git a/pym/portage/const.py b/pym/portage/const.py index aa45cb2..4fd0d64 100644 --- a/pym/portage/const.py +++ b/pym/portage/const.py @@ -11,12 +11,6 @@ import os # save the original prefix BPREFIX = EPREFIX -# pick up EPREFIX from the environment if set -if "EPREFIX" in os.environ: - if os.environ["EPREFIX"] != "": - EPREFIX = os.path.normpath(os.environ["EPREFIX"]) - else: - EPREFIX = os.environ["EPREFIX"] # =========================================================================== # START OF CONSTANTS -- START OF CONSTANTS -- START OF CONSTANTS -- START OF -- 1.7.8.rc3