lkml.org 
[lkml]   [2009]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] scripts/setlocalversion on readonly source
Hi,

I'm building kernels with O=/some/dir and at some point
scripts/setlocalversion is being called, doing:

+ git update-index --refresh --unmerged
fatal: Unable to create '.git/index.lock': Read-only file system

Not only does it throw this error but it takes quite a long time to run,
only to fail anyway because the kernel source dir is located on a
read-only NFS mount.

The following patch makes the error go away:

--- linux-2.6-git/scripts/setlocalversion 2009-05-29 07:14:34.746191990 +0200
+++ /home/dummy/tmp/scripts/setlocalversion.edited 2009-06-09 22:20:29.000000000 +0200
@@ -39,8 +39,8 @@
printf -- '-svn%s' "`git svn find-rev $head`"
fi

- # Are there uncommitted changes?
- git update-index --refresh --unmerged > /dev/null
+ # Are there uncommitted changes? (and can we update the repo?)
+ touch . 2>/dev/null && git update-index --refresh --unmerged > /dev/null
if git diff-index --name-only HEAD | grep -v "^scripts/package" \
| read dummy; then
printf '%s' -dirty

Thanks,
Christian.
--
BOFH excuse #426:

internet is needed to catch the etherbunny


\
 
 \ /
  Last update: 2009-06-09 22:33    [W:0.045 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site