summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/files/setlocalversion.patch
blob: f0925de79155bad3b1efa52fb229cd135ecfe4bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
diff -uNr a/Makefile b/Makefile
--- a/Makefile	2012-05-11 10:45:09.669169201 +0200
+++ b/Makefile	2012-05-11 10:44:57.285708701 +0200
@@ -949,6 +949,7 @@
 # Store (new) KERNELRELASE string in include/config/kernel.release
 include/config/kernel.release: include/config/auto.conf FORCE
 	$(Q)rm -f $@
+	$(Q)rm -f .scmversion
 	$(Q)echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" > $@
 
 
@@ -1463,6 +1464,7 @@
 	$(PERL) $(src)/scripts/checkstack.pl $(CHECKSTACK_ARCH)
 
 kernelrelease:
+	$(Q)rm -f .scmversion
 	@echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))"
 
 kernelversion:
diff -uNr a/scripts/setlocalversion b/scripts/setlocalversion
--- a/scripts/setlocalversion	2012-05-11 10:40:11.926141561 +0200
+++ b/scripts/setlocalversion	2012-05-11 10:43:04.818608594 +0200
@@ -49,12 +49,6 @@
 		# it, because this version is defined in the top level Makefile.
 		if [ -z "`git describe --exact-match 2>/dev/null`" ]; then
 
-			# If only the short version is requested, don't bother
-			# running further git commands
-			if $short; then
-				echo "+"
-				return
-			fi
 			# If we are past a tagged commit (like
 			# "v2.6.30-rc5-302-g72357d5"), we pretty print it.
 			if atag="`git describe 2>/dev/null`"; then
@@ -98,11 +92,6 @@
 			fi
 		fi
 
-		# Are there uncommitted changes?
-		# These are represented by + after the changeset id.
-		case "$hgid" in
-			*+|*+\ *) printf '%s' -dirty ;;
-		esac
 
 		# All done with mercurial
 		return
@@ -163,15 +152,6 @@
 if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
 	# full scm version string
 	res="$res$(scm_version)"
-else
-	# append a plus sign if the repository is not in a clean
-	# annotated or signed tagged state (as git describe only
-	# looks at signed or annotated tags - git tag -a/-s) and
-	# LOCALVERSION= is not specified
-	if test "${LOCALVERSION+set}" != "set"; then
-		scm=$(scm_version --short)
-		res="$res${scm:++}"
-	fi
 fi
 
 echo "$res"