summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-02-22 12:50:48 -0800
committerZac Medico <zmedico@gentoo.org>2012-02-22 12:50:48 -0800
commit0842a51cd5a4cf4652a524fba0a420c17953327a (patch)
tree7829c655880d1b56251de4731669b48be6444d3a
parente465dbc4a726034a173407f3edfffc56e9ad8639 (diff)
downloadportage-0842a51cd5a4cf4652a524fba0a420c17953327a.tar.gz
portage-0842a51cd5a4cf4652a524fba0a420c17953327a.tar.bz2
portage-0842a51cd5a4cf4652a524fba0a420c17953327a.zip
ecompressdir: handle abs symlink, bug #405327
-rwxr-xr-xbin/ebuild-helpers/ecompressdir13
1 files changed, 10 insertions, 3 deletions
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}" \