1 |
Author: grobian |
2 |
Date: 2008-07-28 20:03:55 +0000 (Mon, 28 Jul 2008) |
3 |
New Revision: 11246 |
4 |
|
5 |
Modified: |
6 |
main/branches/prefix/bin/isolated-functions.sh |
7 |
main/branches/prefix/pym/portage/__init__.py |
8 |
main/branches/prefix/pym/portage/elog/messages.py |
9 |
Log: |
10 |
Merged from trunk 11243:11245 |
11 |
|
12 |
| 11244 | Even though the message is split on $'\n' in elog_base(), | |
13 |
| zmedico | it's still not entirely safe to use it as a delimiter in the | |
14 |
| | log file since there can still be escaped newlines that will | |
15 |
| | be expanded due to the echo -e parameter. | |
16 |
|
17 |
| 11245 | Bug #233103 - In portage.fetch(), pass all config variables | |
18 |
| zmedico | instead of just those returned by the environ() method which | |
19 |
| | is filtered. | |
20 |
|
21 |
|
22 |
Modified: main/branches/prefix/bin/isolated-functions.sh |
23 |
=================================================================== |
24 |
--- main/branches/prefix/bin/isolated-functions.sh 2008-07-28 20:00:40 UTC (rev 11245) |
25 |
+++ main/branches/prefix/bin/isolated-functions.sh 2008-07-28 20:03:55 UTC (rev 11246) |
26 |
@@ -177,10 +177,14 @@ |
27 |
return 1 |
28 |
;; |
29 |
esac |
30 |
+ # Note: Even though the message is split on $'\n' here, it's still |
31 |
+ # not entirely safe to use it as a delimiter in the log file since |
32 |
+ # there can still be escaped newlines that will be expanded due to |
33 |
+ # the echo -e parameter. |
34 |
save_IFS |
35 |
IFS=$'\n' |
36 |
for line in $* ; do |
37 |
- echo -ne "${messagetype} ${line}\n" >> \ |
38 |
+ echo -ne "${messagetype} ${line}\n\0" >> \ |
39 |
"${T}/logging/${EBUILD_PHASE:-other}" |
40 |
done |
41 |
restore_IFS |
42 |
|
43 |
Modified: main/branches/prefix/pym/portage/__init__.py |
44 |
=================================================================== |
45 |
--- main/branches/prefix/pym/portage/__init__.py 2008-07-28 20:00:40 UTC (rev 11245) |
46 |
+++ main/branches/prefix/pym/portage/__init__.py 2008-07-28 20:03:55 UTC (rev 11246) |
47 |
@@ -3868,7 +3868,7 @@ |
48 |
myfetch = ["bash", "-c", "exec \"$@\"", myfetch[0]] + myfetch |
49 |
|
50 |
myret = portage.process.spawn(myfetch, |
51 |
- env=mysettings.environ(), **spawn_keywords) |
52 |
+ env=dict(mysettings.iteritems()), **spawn_keywords) |
53 |
|
54 |
if mysettings.selinux_enabled(): |
55 |
selinux.setexec(None) |
56 |
|
57 |
Modified: main/branches/prefix/pym/portage/elog/messages.py |
58 |
=================================================================== |
59 |
--- main/branches/prefix/pym/portage/elog/messages.py 2008-07-28 20:00:40 UTC (rev 11245) |
60 |
+++ main/branches/prefix/pym/portage/elog/messages.py 2008-07-28 20:03:55 UTC (rev 11246) |
61 |
@@ -35,7 +35,7 @@ |
62 |
logentries[msgfunction] = [] |
63 |
lastmsgtype = None |
64 |
msgcontent = [] |
65 |
- for l in open(filename, "r"): |
66 |
+ for l in open(filename, "r").read().split("\0"): |
67 |
if not l: |
68 |
continue |
69 |
try: |