diff options
-rwxr-xr-x | bin/ebuild.sh | 2 | ||||
-rw-r--r-- | pym/portage.py | 16 | ||||
-rw-r--r-- | pym/portage_util.py | 2 |
3 files changed, 16 insertions, 4 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index f657dddce..fdd7da0e0 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -45,8 +45,6 @@ alias restore_IFS='if [ "${old_IFS:-unset}" != "unset" ]; then IFS="${old_IFS}"; OCC="$CC" OCXX="$CXX" -source /etc/profile.env &>/dev/null - export PATH="/usr/local/sbin:/sbin:/usr/sbin:${PORTAGE_BIN_PATH}:/usr/local/bin:/bin:/usr/bin:${ROOTPATH}" [ ! -z "$PREROOTPATH" ] && export PATH="${PREROOTPATH%%:}:$PATH" diff --git a/pym/portage.py b/pym/portage.py index c32cb62b2..b0c6b1102 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -810,8 +810,9 @@ class config: "conf": self.configlist[2], "pkg": self.configlist[3], "auto": self.configlist[4], - "backupenv": self.configlist[5], - "env": self.configlist[6] } + "env.d": self.configlist[5], + "backupenv": self.configlist[6], + "env": self.configlist[7] } self.profiles = copy.deepcopy(clone.profiles) self.backupenv = self.configdict["backupenv"] self.pusedict = copy.deepcopy(clone.pusedict) @@ -994,6 +995,9 @@ class config: self.configlist.append({}) self.configdict["auto"]=self.configlist[-1] + self.configlist.append({}) + self.configdict["env.d"] = self.configlist[-1] + self.configlist.append(self.backupenv) # XXX Why though? self.configdict["backupenv"]=self.configlist[-1] @@ -1383,6 +1387,14 @@ class config: else: self.already_in_regenerate = 1 + # We grab the latest profile.env here since it changes frequently. + self.configdict["env.d"].clear() + env_d = getconfig( + os.path.join(self["PORTAGE_CONFIGROOT"], "etc", "profile.env")) + if env_d: + # env_d will be None if profile.env doesn't exist. + self.configdict["env.d"].update(env_d) + if useonly: myincrementals=["USE"] else: diff --git a/pym/portage_util.py b/pym/portage_util.py index a0385323d..7a37d980d 100644 --- a/pym/portage_util.py +++ b/pym/portage_util.py @@ -241,6 +241,8 @@ def getconfig(mycfg,tolerant=0,allow_sourcing=False): lex.source="source" while 1: key=lex.get_token() + if key == "export": + key = lex.get_token() if (key==''): #normal end of file break; |