From: Zac Medico Date: Sat, 2 Jun 2012 02:36:52 +0000 (-0700) Subject: ecompressdir: fix ln -s for bug #418309 X-Git-Tag: v2.2.0_alpha109~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bbacf8674168cf033de0ccb161f568d0b26f032b;p=portage.git ecompressdir: fix ln -s for bug #418309 This fixes parallel funk_up_dir decompress calls so that they don't inappropriately compete with eachother to fix the same broken symlinks. --- diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir index 7d5d4322b..f39f883f3 100755 --- a/bin/ebuild-helpers/ecompressdir +++ b/bin/ebuild-helpers/ecompressdir @@ -80,9 +80,13 @@ funk_up_dir() { skip_dir_dest=${T}/ecompress-skip/${actual_dir#${ED}}/${brokenlink%/*}/${olddest} fi [[ -e ${skip_dir_dest} ]] && continue - [[ ${act} == "compress" ]] \ - && newdest="${olddest}${suffix}" \ - || newdest="${olddest%${suffix}}" + if [[ ${act} == "compress" ]] ; then + newdest=${olddest}${suffix} + else + [[ ${olddest} == *${suffix} ]] || continue + newdest=${olddest%${suffix}} + fi + [[ -f ${newdest} ]] || continue rm -f "${brokenlink}" [[ ${act} == "compress" ]] \ && ln -snf "${newdest}" "${brokenlink}${suffix}" \