Author: grobian
Date: 2008-07-28 20:03:55 +0000 (Mon, 28 Jul 2008)
New Revision: 11246
Modified:
main/branches/prefix/bin/isolated-functions.sh
main/branches/prefix/pym/portage/__init__.py
main/branches/prefix/pym/portage/elog/messages.py
Log:
Merged from trunk 11243:11245
| 11244 | Even though the message is split on $'\n' in elog_base(), |
| zmedico | it's still not entirely safe to use it as a delimiter in the |
| | log file since there can still be escaped newlines that will |
| | be expanded due to the echo -e parameter. |
| 11245 | Bug #233103 - In portage.fetch(), pass all config variables |
| zmedico | instead of just those returned by the environ() method which |
| | is filtered. |
Modified: main/branches/prefix/bin/isolated-functions.sh
===================================================================
--- main/branches/prefix/bin/isolated-functions.sh 2008-07-28 20:00:40 UTC (rev 11245)
+++ main/branches/prefix/bin/isolated-functions.sh 2008-07-28 20:03:55 UTC (rev 11246)
@@ -177,10 +177,14 @@
return 1
;;
esac
+ # Note: Even though the message is split on $'\n' here, it's still
+ # not entirely safe to use it as a delimiter in the log file since
+ # there can still be escaped newlines that will be expanded due to
+ # the echo -e parameter.
save_IFS
IFS=$'\n'
for line in $* ; do
- echo -ne "${messagetype} ${line}\n" >> \
+ echo -ne "${messagetype} ${line}\n\0" >> \
"${T}/logging/${EBUILD_PHASE:-other}"
done
restore_IFS
Modified: main/branches/prefix/pym/portage/__init__.py
===================================================================
--- main/branches/prefix/pym/portage/__init__.py 2008-07-28 20:00:40 UTC (rev 11245)
+++ main/branches/prefix/pym/portage/__init__.py 2008-07-28 20:03:55 UTC (rev 11246)
@@ -3868,7 +3868,7 @@
myfetch = ["bash", "-c", "exec \"$@\"", myfetch[0]] + myfetch
myret = portage.process.spawn(myfetch,
- env=mysettings.environ(), **spawn_keywords)
+ env=dict(mysettings.iteritems()), **spawn_keywords)
if mysettings.selinux_enabled():
selinux.setexec(None)
Modified: main/branches/prefix/pym/portage/elog/messages.py
===================================================================
--- main/branches/prefix/pym/portage/elog/messages.py 2008-07-28 20:00:40 UTC (rev 11245)
+++ main/branches/prefix/pym/portage/elog/messages.py 2008-07-28 20:03:55 UTC (rev 11246)
@@ -35,7 +35,7 @@
logentries[msgfunction] = []
lastmsgtype = None
msgcontent = []
- for l in open(filename, "r"):
+ for l in open(filename, "r").read().split("\0"):
if not l:
continue
try:
|