From: Zac Medico Date: Sat, 3 Feb 2007 10:26:08 +0000 (-0000) Subject: For bug #165034, make sure that symlinks are excluded from chmod calls. X-Git-Tag: v2.2_pre1~1759 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=82bf9540f2c1c53b7027dbe5924b6c2032951a11;p=portage.git For bug #165034, make sure that symlinks are excluded from chmod calls. svn path=/main/trunk/; revision=5877 --- diff --git a/bin/ebuild.sh b/bin/ebuild.sh index aa3c1281f..3afa031e2 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -456,7 +456,11 @@ unpack() { done # Do not chmod '.' since it's probably ${WORKDIR} and PORTAGE_WORKDIR_MODE # should be preserved. - find . -mindepth 1 -print0 | ${XARGS} -0 chmod -f a+rX,u+w,g-w,o-w + local myfile + find . -mindepth 1 -maxdepth 1 -print0 | while read -d $'\0' myfile; do + [ -L "${myfile}" ] && continue # find can't exclude symlinks by itself. + chmod -fR a+rX,u+w,g-w,o-w "${myfile}" + done } strip_duplicate_slashes() {