Gentoo Logo
Gentoo Spaceship




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
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Zac Medico (zmedico)" <zmedico@g.o>
Subject: portage r11244 - in main/trunk: bin pym/portage/elog
Date: Mon, 28 Jul 2008 19:48:01 +0000
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:



Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo-x86 commit in app-editors/nano: ChangeLog metadata.xml
Next by thread:
gentoo-x86 commit in app-editors/tea: ChangeLog metadata.xml
Previous by date:
gentoo-x86 commit in profiles: ChangeLog use.local.desc
Next by date:
gentoo-x86 commit in app-editors/tea: ChangeLog metadata.xml


Updated Apr 29, 2012

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.