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

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() {