On occasion, webkitpy is hosted on an NFS mount. It would be wrong for clients which do not own the checkout to write auto-installed libraries to the NFS mount, since they do not own the mount.
<rdar://problem/66698141>
Created attachment 406208 [details] Patch
Created attachment 406209 [details] Patch
Comment on attachment 406209 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=406209&action=review LGTM /w comments. Unofficial r+. > Tools/Scripts/webkitpy/__init__.py:22 > +if sys.platform == 'darwin' and (not os.getuid() or os.stat(libraries).st_uid != os.getuid()): This is a bit difficult to read; can we split some of the logic into variables to make it clearer? e.g. is_root_user = os.getuid() == 0 user_owns_local_libraries = os.stat(libraries).st_uid == os.getuid() if sys.platform == 'darwin' and (is_root_user or not user_owns_local_libraries): libraries = os.path.expanduser('~/Library/webkitpy')
Created attachment 406214 [details] Patch
Comment on attachment 406214 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=406214&action=review > Tools/Scripts/webkitpy/__init__.py:23 > +if sys.platform == 'darwin' and (is_root or not does_own_libraries): Is it right to autoinstall onto a share even for someone who owns the directory?
(In reply to Alexey Proskuryakov from comment #6) > Comment on attachment 406214 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=406214&action=review > > > Tools/Scripts/webkitpy/__init__.py:23 > > +if sys.platform == 'darwin' and (is_root or not does_own_libraries): > > Is it right to autoinstall onto a share even for someone who owns the > directory? Probably not, although I'm not sure a reliable way to determine if a given directory is a share. In practice, in all of the cases I'm aware of a share being used, it would be a configuration error if an individual user owned a directory anyways.
Committed r265408: <https://trac.webkit.org/changeset/265408> All reviewed patches have been landed. Closing bug and clearing flags on attachment 406214 [details].
WinCairo buildbot is failing since this change. https://build.webkit.org/builders/WinCairo%2064-bit%20WKL%20Debug%20%28Tests%29/builds/3130 Traceback (most recent call last): File "./Tools/Scripts/run-webkit-tests", line 36, in <module> from webkitpy.common import multiprocessing_bootstrap File "C:\WebKit-BuildWorker\wincairo-wkl-debug-tests\build\Tools\Scripts\webkitpy\__init__.py", line 21, in <module> is_root = not os.getuid() AttributeError: 'module' object has no attribute 'getuid'
Committed r265409: <https://trac.webkit.org/changeset/265409>