Merged from trunk 11243:11245
authorFabian Groffen <grobian@gentoo.org>
Mon, 28 Jul 2008 20:03:55 +0000 (20:03 -0000)
committerFabian Groffen <grobian@gentoo.org>
Mon, 28 Jul 2008 20:03:55 +0000 (20:03 -0000)
   | 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.                                                 |

svn path=/main/branches/prefix/; revision=11246

bin/isolated-functions.sh
pym/portage/__init__.py
pym/portage/elog/messages.py

index 5b3027b4316e6a85b2f17a40dc50d0cc339c764c..8e43de36b29a960258d5f8f628a33015ed5d3e4e 100755 (executable)
@@ -177,10 +177,14 @@ elog_base() {
                        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
index 38b6100927a3129c72ca4f8bf3e2447b44e6648c..e6a3d169535d9fa1d6da943d3837e0f5390fca6e 100644 (file)
@@ -3868,7 +3868,7 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
                                                        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)
index d9e26ce874d535af94812064d015ed380b3c98a9..5455e17f4017bbc48394246bd7cfcda45af559a7 100644 (file)
@@ -35,7 +35,7 @@ def collect_ebuild_messages(path):
                        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: