projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
324628c
)
save-ebuild-env.sh: tweak PYTHONPATH cleansing
author
Zac Medico
<zmedico@gentoo.org>
Mon, 12 Sep 2011 03:06:27 +0000
(20:06 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Mon, 12 Sep 2011 03:06:27 +0000
(20:06 -0700)
bin/save-ebuild-env.sh
patch
|
blob
|
history
diff --git
a/bin/save-ebuild-env.sh
b/bin/save-ebuild-env.sh
index 3bb8255ab3145f97270e340174c67f3c6610fb98..a84a1258b40e70112f5ccb228604de97c2dda896 100644
(file)
--- a/
bin/save-ebuild-env.sh
+++ b/
bin/save-ebuild-env.sh
@@
-14,9
+14,13
@@
save_ebuild_env() {
(
if has --exclude-init-phases $* ; then
unset S _E_DOCDESTTREE_ _E_EXEDESTTREE_
- if [[ -n $PYTHONPATH ]] ; then
- export PYTHONPATH=${PYTHONPATH/${PORTAGE_PYM_PATH}:}
- [[ -z $PYTHONPATH ]] && unset PYTHONPATH
+ if [[ -n $PYTHONPATH &&
+ ${PYTHONPATH%%:*} -ef $PORTAGE_PYM_PATH ]] ; then
+ if [[ $PYTHONPATH == *:* ]] ; then
+ export PYTHONPATH=${PYTHONPATH#*:}
+ else
+ unset PYTHONPATH
+ fi
fi
fi