Note: Due to technical difficulties, the Archives are currently not up to date.
GMANE provides an alternative service for most mailing lists. c.f. bug 424647
List Archive: gentoo-commits
Author: zmedico
Date: 2008-07-28 19:48:00 +0000 (Mon, 28 Jul 2008)
New Revision: 11244
Modified:
main/trunk/bin/isolated-functions.sh
main/trunk/pym/portage/elog/messages.py
Log:
Even though the message is split on $'\n' in elog_base(), 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.
Modified: main/trunk/bin/isolated-functions.sh
===================================================================
--- main/trunk/bin/isolated-functions.sh 2008-07-28 18:38:40 UTC (rev 11243)
+++ main/trunk/bin/isolated-functions.sh 2008-07-28 19:48:00 UTC (rev 11244)
@@ -170,10 +170,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/trunk/pym/portage/elog/messages.py
===================================================================
--- main/trunk/pym/portage/elog/messages.py 2008-07-28 18:38:40 UTC (rev 11243)
+++ main/trunk/pym/portage/elog/messages.py 2008-07-28 19:48:00 UTC (rev 11244)
@@ -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:
|
|