ecompressdir: fix brokenlink newdest logic
authorZac Medico <zmedico@gentoo.org>
Sat, 2 Jun 2012 04:06:14 +0000 (21:06 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 2 Jun 2012 04:06:14 +0000 (21:06 -0700)
Was broken in commit bbacf8674168cf033de0ccb161f568d0b26f032b.

bin/ebuild-helpers/ecompressdir

index c77d9982af20de91c528192ea6c4c69f00e114a6..6801a07d4b9d834d144a809769dd378f96c36c9d 100755 (executable)
@@ -86,7 +86,11 @@ funk_up_dir() {
                        [[ ${olddest} == *${suffix} ]] || continue
                        newdest=${olddest%${suffix}}
                fi
-               [[ -f ${newdest} ]] || continue
+               if [[ "${newdest}" == /* ]] ; then
+                       [[ -f "${D}${newdest}" ]] || continue
+               else
+                       [[ -f "${dir}/${brokenlink%/*}/${newdest}" ]] || continue
+               fi
                rm -f "${brokenlink}"
                [[ ${act} == "compress" ]] \
                        && ln -snf "${newdest}" "${brokenlink}${suffix}" \