From bbacf8674168cf033de0ccb161f568d0b26f032b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 1 Jun 2012 19:36:52 -0700 Subject: [PATCH] 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. --- bin/ebuild-helpers/ecompressdir | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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}" \ -- 2.26.2