Messages in this thread Patch in this message | | | Date | Tue, 9 Jun 2009 13:30:18 -0700 (PDT) | From | Christian Kujau <> | 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
| |