mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [merged] scripts-setlocalversion-on-write-protected-source-tree.patch removed from -mm tree
@ 2013-06-25 19:22 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2013-06-25 19:22 UTC (permalink / raw)
  To: mm-commits, nico-linuxsetlocalversion, mmarek, lists

Subject: [merged] scripts-setlocalversion-on-write-protected-source-tree.patch removed from -mm tree
To: lists@nerdbynature.de,mmarek@suse.cz,nico-linuxsetlocalversion@schottelius.org,mm-commits@vger.kernel.org
From: akpm@linux-foundation.org
Date: Tue, 25 Jun 2013 12:22:54 -0700


The patch titled
     Subject: scripts/setlocalversion on write-protected source tree
has been removed from the -mm tree.  Its filename was
     scripts-setlocalversion-on-write-protected-source-tree.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Christian Kujau <lists@nerdbynature.de>
Subject: 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>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 scripts/setlocalversion |    3 ---
 1 file changed, 3 deletions(-)

diff -puN scripts/setlocalversion~scripts-setlocalversion-on-write-protected-source-tree scripts/setlocalversion
--- a/scripts/setlocalversion~scripts-setlocalversion-on-write-protected-source-tree
+++ a/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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-25 19:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-25 19:22 [merged] scripts-setlocalversion-on-write-protected-source-tree.patch removed from -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).