For bug #164617, don't change permissions on ${WORKDIR} with unpack(). (trunk r5842)
authorZac Medico <zmedico@gentoo.org>
Tue, 30 Jan 2007 23:34:07 +0000 (23:34 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 30 Jan 2007 23:34:07 +0000 (23:34 -0000)
svn path=/main/branches/2.1.2/; revision=5843

bin/ebuild.sh

index 4bf8de4007d0fbc677fb7504e78fd8be179d3666..3317996b452507117c3ff6c3f5220440e5abc448 100755 (executable)
@@ -454,7 +454,11 @@ unpack() {
                                ;;
                esac
        done
-       chmod -Rf a+rX,u+w,g-w,o-w .
+       local previous_dotglob=$(shopt -p dotglob)
+       # Do not chmod '.' since it's probably ${WORKDIR} and PORTAGE_WORKDIR_MODE
+       # should be preserved.
+       chmod -Rf a+rX,u+w,g-w,o-w *
+       eval ${previous_dotglob}
 }
 
 strip_duplicate_slashes() {