aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2010-08-16 11:09:52 -0400
committerMichal Marek <mmarek@suse.cz>2010-08-21 09:14:59 -0400
commit8558f59edf935cf5ee5ffc29a9e9458fd9a71be1 (patch)
tree7c5f4db113ca10dfbaeb193a762282809fb9cb8b /scripts
parent7b8ea53d7f1865cd8f05dfb8f706a4ff5a72abcf (diff)
setlocalversion: Ignote SCMs above the linux source tree
Dan McGee <dpmcgee@gmail.com> writes: > Note that when in git, you get the appended "+" sign. If > LOCALVERSION_AUTO is set, you will get something like > "eee-gb01b08c-dirty" (whereas the copy of the tree in /tmp still > returns "eee"). It doesn't matter whether the working tree is dirty or > clean. > > Is there a way to disable this? I'm building from a clean tarball that > just happens to be unpacked inside a git repository. One would think > setting LOCALVERSION_AUTO to false would do it, but no such luck... Fix this by checking if the kernel source tree is the root of the git or hg repository. No fix for svn: If the kernel source is not tracked in the svn repository, it works as expected, otherwise determining the 'repository root' is not really a defined task. Reported-and-tested-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/setlocalversion4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index e90a91cc518..057b6b3c5df 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -43,7 +43,7 @@ scm_version()
43 fi 43 fi
44 44
45 # Check for git and a git repo. 45 # Check for git and a git repo.
46 if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then 46 if test -d .git && head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
47 47
48 # If we are at a tagged commit (like "v2.6.30-rc6"), we ignore 48 # If we are at a tagged commit (like "v2.6.30-rc6"), we ignore
49 # it, because this version is defined in the top level Makefile. 49 # it, because this version is defined in the top level Makefile.
@@ -85,7 +85,7 @@ scm_version()
85 fi 85 fi
86 86
87 # Check for mercurial and a mercurial repo. 87 # Check for mercurial and a mercurial repo.
88 if hgid=`hg id 2>/dev/null`; then 88 if test -d .hg && hgid=`hg id 2>/dev/null`; then
89 tag=`printf '%s' "$hgid" | cut -s -d' ' -f2` 89 tag=`printf '%s' "$hgid" | cut -s -d' ' -f2`
90 90
91 # Do we have an untagged version? 91 # Do we have an untagged version?