diff options
author | Christian Kujau <lists@nerdbynature.de> | 2013-06-14 18:04:34 -0700 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2013-06-24 00:08:01 +0200 |
commit | cdf2bc632ebc9ef512345fe8e6015edfd367e256 (patch) | |
tree | 2215ce9851e621b9f2aa5b073f1f177ea927c5c4 /scripts/setlocalversion | |
parent | 1c00a47e48d1bad3ca60c4e923d51c4ac6add5b5 (diff) | |
download | linux-cdf2bc632ebc9ef512345fe8e6015edfd367e256.tar.gz linux-cdf2bc632ebc9ef512345fe8e6015edfd367e256.tar.bz2 linux-cdf2bc632ebc9ef512345fe8e6015edfd367e256.zip |
scripts/setlocalversion on write-protected source tree
I just stumbled across another[0] issue when scripts/setlocalversion
operates on a write-protected source tree. Back then[0] the source tree
was on an read-only NFS share, so "test -w" was introduced before "git
update-index" was run.
This time, the source tree is on read/write NFS share, but the permissions
are world-readable and only a specific user (or root) can write.
Thus, "test -w ." returns "0" and then runs "git update-index",
producing the following message (on a dirty tree):
fatal: Unable to create '/usr/local/src/linux-git/.git/index.lock': Permission denied
While it says "fatal", compilation continues just fine.
However, I don't think a kernel compilation should alter the source
tree (or the .git directory) in any way and I don't see how removing
"git update-index" could do any harm. The Mercurial and SVN routines in
scripts/setlocalversion don't have any tree-modifying commands, AFAICS.
So, maybe the patch below would be acceptable.
[0] https://patchwork.kernel.org/patch/29718/
Signed-off-by: Christian Kujau <lists@nerdbynature.de>
Cc: Nico Schottelius <nico-linuxsetlocalversion@schottelius.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/setlocalversion')
-rwxr-xr-x | scripts/setlocalversion | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/scripts/setlocalversion b/scripts/setlocalversion index 84b88f109b80..d105a44b68f6 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -71,9 +71,6 @@ scm_version() printf -- '-svn%s' "`git svn find-rev $head`" fi - # Update index only on r/w media - [ -w . ] && git update-index --refresh --unmerged > /dev/null - # Check for uncommitted changes if git diff-index --name-only HEAD | grep -qv "^scripts/package"; then printf '%s' -dirty |