Fix IFS=: bleeding out from java-vm_sandbox-predict invocations
authorBrian Harring <ferringb@gentoo.org>
Sun, 4 Dec 2011 06:52:39 +0000 (06:52 +0000)
committerBrian Harring <ferringb@gentoo.org>
Sun, 4 Dec 2011 06:52:39 +0000 (06:52 +0000)
eclass/ChangeLog
eclass/java-vm-2.eclass

index cd99fc6366d3c888900041867bf5590076a2be8e..bb2e88fcf2c7f80966a02119089c47d03d2b80e9 100644 (file)
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.33 2011/12/03 20:43:21 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.34 2011/12/04 06:52:39 ferringb Exp $
+
+  04 Dec 2011; Brian Harring <ferringb@gentoo.org> java-vm-2.eclass:
+  Fix IFS=: bleeding out from java-vm_sandbox-predict invocations.
 
   03 Dec 2011; Ulrich Mueller <ulm@gentoo.org> elisp.eclass,
   elisp-common.eclass:
index 554f9e5715fa2c7cb5b65678e91cfdf6ea3383d9..c215a9b161d05032c812161f50e3ebe12ce06f00 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.40 2011/11/24 20:05:01 sera Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.41 2011/12/04 06:52:39 ferringb Exp $
 
 # -----------------------------------------------------------------------------
 # @eclass-begin
@@ -250,7 +250,9 @@ java-vm_sandbox-predict() {
        has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
 
        local path path_arr=("$@")
-       IFS=":" path="${path_arr[*]}"
+       # subshell this to prevent IFS bleeding out dependant on bash version.
+       # could use local, which *should* work, but that requires a lot of testing.
+       path=$(IFS=":" echo "${path_arr[*]}")
        dodir /etc/sandbox.d
        echo "SANDBOX_PREDICT=\"${path}\"" > "${ED}/etc/sandbox.d/20${VMHANDLE}" \
                || die "Failed to write sandbox control file"