From: Christian Kujau <lists@nerdbynature.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: nico-linuxsetlocalversion@schottelius.org
Subject: [PATCH] scripts/setlocalversion on readonly source
Date: Tue, 9 Jun 2009 13:30:18 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.01.0906091323520.6439@bogon> (raw)
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
next reply other threads:[~2009-06-09 20:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20090611153332.d168e58e.akpm@linux-foundation.org>
[not found] ` <20090612043922.GA13001@uranus.ravnborg.org>
2009-06-09 20:30 ` Christian Kujau [this message]
2009-06-12 7:59 ` Nico Schottelius
2009-06-12 17:03 ` Christian Kujau
2009-06-14 20:27 ` Sam Ravnborg
2009-06-14 20:46 ` Christian Kujau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.01.0906091323520.6439@bogon \
--to=lists@nerdbynature.de \
--cc=linux-kernel@vger.kernel.org \
--cc=nico-linuxsetlocalversion@schottelius.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®