From: Fabian Groffen Date: Fri, 1 Feb 2008 22:22:20 +0000 (-0000) Subject: Variables work pretty bad between subshells, so use a file instead X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=b1dbf4f19928674488161fef44ae6959f5698000;p=portage.git Variables work pretty bad between subshells, so use a file instead svn path=/main/branches/prefix/; revision=9271 --- diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 2f4f6e426..2eec3579a 100644 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -341,7 +341,7 @@ install_qa_check() { # together with the scan for broken installs. rm -f "${T}"/.install_name_check_failed [[ ${CHOST} == *-darwin* ]] && find "${ED}" -type f | while read f ; do - needed="" + rm -f "${T}"/.NEEDED.tmp otool -LX "${f}" \ | grep -v "Archive : " \ | sed -e 's/^\t//' -e 's/ (compa.*$//' \ @@ -364,10 +364,12 @@ install_qa_check() { touch "${T}"/.install_name_check_failed fi fi - needed=${needed}${needed:+,}${r} + echo -n ",${r}" >> "${T}"/.NEEDED.tmp done - [[ -n ${needed} ]] && \ - echo "/${f#${D}} ${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED + if [[ -f "${T}"/.NEEDED.tmp ]] ; then + needed=$(< "${T}"/.NEEDED.tmp) + echo "/${f#${D}} ${needed#,}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED + fi done if [[ -f ${T}/.install_name_check_failed ]] ; then # secret switch "allow_broken_install_names" to get