diff -Nur portage-2.2.0_alpha142.orig/bin/ebuild-helpers/ecompressdir portage-2.2.0_alpha142/bin/ebuild-helpers/ecompressdir --- portage-2.2.0_alpha142.orig/bin/ebuild-helpers/ecompressdir 2012-10-27 02:45:54.000000000 +0900 +++ portage-2.2.0_alpha142/bin/ebuild-helpers/ecompressdir 2012-12-19 21:40:46.000000000 +0900 @@ -67,6 +67,18 @@ find "${dir}" -type f ${negate} -iname '*'${suffix} -print0 | ${XARGS} -0 ${binary} ((ret|=$?)) + local filelist="${T}/ecompress-filelist-${RANDOM}" + if [ ! -e "${filelist}" ] ; then + touch "${filelist}" + else + while [ -e "${filelist}" ] ; do + filelist="${T}/ecompress-filelist-${RANDOM}" + sleep 1 + done + touch "${filelist}" + fi + + (find "${dir}" -type l -print0) > "${filelist}" while read -r -d $'\0' brokenlink ; do [[ -e ${brokenlink} ]] && continue olddest=$(readlink "${brokenlink}") @@ -97,7 +109,8 @@ && ln -snf "${newdest}" "${brokenlink}${suffix}" \ || ln -snf "${newdest}" "${brokenlink%${suffix}}" ((ret|=$?)) - done < <(find "${dir}" -type l -print0) + done < "${filelist}" + rm "${filelist}" return ${ret} } diff -Nur portage-2.2.0_alpha142.orig/bin/ebuild-helpers/prepstrip portage-2.2.0_alpha142/bin/ebuild-helpers/prepstrip --- portage-2.2.0_alpha142.orig/bin/ebuild-helpers/prepstrip 2012-12-19 21:25:22.000000000 +0900 +++ portage-2.2.0_alpha142/bin/ebuild-helpers/prepstrip 2012-12-19 21:25:45.000000000 +0900 @@ -276,17 +276,16 @@ else get_inode_number() { stat -c '%i' "$1"; } fi +# Use sort -u to eliminate duplicates for bug #445336. +(scanelf -yqRBF '#k%F' -k '.symtab' "$@" + find "$@" -type f ! -type l -name '*.a' ) | LC_ALL=C sort -u > ${tmpdir}/prepstrip-filelist-$$ + cd "${tmpdir}/inodes" || die "cd failed unexpectedly" while read -r x ; do inode_link=$(get_inode_number "${x}") || die "stat failed unexpectedly" echo "${x}" >> "${inode_link}" || die "echo failed unexpectedly" -done < <( - # Use sort -u to eliminate duplicates for bug #445336. - ( - scanelf -yqRBF '#k%F' -k '.symtab' "$@" - find "$@" -type f ! -type l -name '*.a' - ) | LC_ALL=C sort -u -) +done < ${tmpdir}/prepstrip-filelist-$$ +rm ${tmpdir}/prepstrip-filelist-$$ # Now we look for unstripped binaries. for inode_link in $(shopt -s nullglob; echo *) ; do