1 |
Author: zmedico |
2 |
Date: 2008-09-30 01:06:20 +0000 (Tue, 30 Sep 2008) |
3 |
New Revision: 11601 |
4 |
|
5 |
Modified: |
6 |
main/trunk/bin/isolated-functions.sh |
7 |
main/trunk/pym/portage/elog/messages.py |
8 |
Log: |
9 |
Now that elog_base() uses 'echo -e' to expand escape codes prior to using |
10 |
'read' to split on newlines, it's safe to use newlines as delimiters in |
11 |
the log file since 'read' is guaranteed to split any newlines contained |
12 |
in the arguments. |
13 |
|
14 |
|
15 |
Modified: main/trunk/bin/isolated-functions.sh |
16 |
=================================================================== |
17 |
--- main/trunk/bin/isolated-functions.sh 2008-09-29 16:58:48 UTC (rev 11600) |
18 |
+++ main/trunk/bin/isolated-functions.sh 2008-09-30 01:06:20 UTC (rev 11601) |
19 |
@@ -170,12 +170,8 @@ |
20 |
return 1 |
21 |
;; |
22 |
esac |
23 |
- # Note: Even though the message is split on $'\n' here, it's still |
24 |
- # not entirely safe to use it as a delimiter in the log file since |
25 |
- # there can still be escaped newlines that will be expanded due to |
26 |
- # the echo -e parameter. |
27 |
echo -e "$@" | while read line ; do |
28 |
- echo -ne "${messagetype} ${line}\n\0" >> \ |
29 |
+ echo "${messagetype} ${line}" >> \ |
30 |
"${T}/logging/${EBUILD_PHASE:-other}" |
31 |
done |
32 |
return 0 |
33 |
|
34 |
Modified: main/trunk/pym/portage/elog/messages.py |
35 |
=================================================================== |
36 |
--- main/trunk/pym/portage/elog/messages.py 2008-09-29 16:58:48 UTC (rev 11600) |
37 |
+++ main/trunk/pym/portage/elog/messages.py 2008-09-30 01:06:20 UTC (rev 11601) |
38 |
@@ -35,7 +35,7 @@ |
39 |
logentries[msgfunction] = [] |
40 |
lastmsgtype = None |
41 |
msgcontent = [] |
42 |
- for l in open(filename, "r").read().split("\0"): |
43 |
+ for l in open(filename, "rb"): |
44 |
if not l: |
45 |
continue |
46 |
try: |