From: Zac Medico Date: Wed, 22 Feb 2012 20:50:48 +0000 (-0800) Subject: ecompressdir: handle abs symlink, bug #405327 X-Git-Tag: v2.2.0_alpha89~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0842a51cd5a4cf4652a524fba0a420c17953327a;p=portage.git ecompressdir: handle abs symlink, bug #405327 --- diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir index 74973abda..17ecd8082 100755 --- a/bin/ebuild-helpers/ecompressdir +++ b/bin/ebuild-helpers/ecompressdir @@ -10,7 +10,7 @@ if [[ -z $1 ]] ; then fi [[ " ${FEATURES} " == *" force-prefix "* ]] || \ - case "$EAPI" in 0|1|2) ED=${D} ;; esac + case "$EAPI" in 0|1|2) ED=${D} EPREFIX= ;; esac case $1 in --ignore) @@ -70,8 +70,15 @@ funk_up_dir() { [[ -e ${brokenlink} ]] && continue olddest=$(readlink "${brokenlink}") # Ignore temporarily broken symlinks due to - # _relocate_skip_dirs (bug #399595). - skip_dir_dest=${T}/ecompress-skip/${actual_dir#${ED}}/${brokenlink%/*}/${olddest} + # _relocate_skip_dirs (bug #399595), and handle + # absolute symlinks to files that aren't merged + # yet (bug #405327). + if [[ ${olddest} == /* ]] ; then + [ -e "${D}${olddest}" ] && continue + skip_dir_dest=${T}/ecompress-skip/${olddest#${EPREFIX}} + else + skip_dir_dest=${T}/ecompress-skip/${actual_dir#${ED}}/${brokenlink%/*}/${olddest} + fi [[ -e ${skip_dir_dest} ]] && continue [[ ${act} == "compress" ]] \ && newdest="${olddest}${suffix}" \