Skip to contentSkip to conversation

Fix LOCALVERSION append plus logic

PATCH In review [email protected] 2 participants 2 messages Oct 7, 2010 – Oct 8, 2010 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix LOCALVERSION append plus logic

From: Alan Tull <[email protected]>

This change fixes the logic to do what the comment says when CONFIG_LOCALVERSION_AUTO and CONFIG_LOCALVERSION are both not set.

Also fix a spelling error in the comment.

If the kernel tree is in git, here's the config permutations (with CONFIG_LOCALVERSION_AUTO turned off) and the image name resulting:

CONFIG_LOCALVERSION=""
results:

patched   :   Linux-2.6.35.3+
unpatched :   Linux-2.6.35.3

CONFIG_LOCALVERSION="-something"
results:

patched   :   Linux-2.6.35.3-something
unpatched :   Linux-2.6.35.3-something+
---
 scripts/setlocalversion |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
scripts/setlocalversion +2 -2
index 64a9cb5..4488a33 100755
@@ -160,9 +160,9 @@ if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
 	# full scm version string
 	res="$res$(scm_version)"
 else
-	# apped a plus sign if the repository is not in a clean tagged
+	# append a plus sign if the repository is not in a clean tagged
 	# state and  LOCALVERSION= is not specified
-	if test "${LOCALVERSION+set}" != "set"; then
+	if test "$CONFIG_LOCALVERSION" = ""; then
 		scm=$(scm_version --short)
 		res="$res${scm:++}"
 	fi
Signature · 1 line
1.6.0.4
#1 lore raw
Quoted 8 lines · On 7.10.2010 22:18, [email protected] wrote:

From: Alan Tull <[email protected]>

This change fixes the logic to do what the comment says when CONFIG_LOCALVERSION_AUTO and CONFIG_LOCALVERSION are both not set.

Also fix a spelling error in the comment.

Quoted 7 lines

If the kernel tree is in git, here's the config permutations (with CONFIG_LOCALVERSION_AUTO turned off) and the image name resulting:

CONFIG_LOCALVERSION=""
results:
patched : Linux-2.6.35.3+

That's a result of patching the kernel and thus moving away from the v2.6.35.3 tag.

Quoted 6 lines

unpatched : Linux-2.6.35.3

CONFIG_LOCALVERSION="-something"
results:

patched   :   Linux-2.6.35.3-something
unpatched :   Linux-2.6.35.3-something+

Dunno how you got this, was it really a clean 2.6.35.3?

Quoted 11 lines
---
 scripts/setlocalversion |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
scripts/setlocalversion +0 -0
index 64a9cb5..4488a33 100755
@@ -160,9 +160,9 @@ if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
 	# full scm version string

scripts/setlocalversion if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then · line 168

Quoted 10 lines
scripts/setlocalversion +2 -2
 	res="$res$(scm_version)"
 else
-	# apped a plus sign if the repository is not in a clean tagged
+	# append a plus sign if the repository is not in a clean tagged
 	# state and  LOCALVERSION= is not specified
-	if test "${LOCALVERSION+set}" != "set"; then
+	if test "$CONFIG_LOCALVERSION" = ""; then
 		scm=$(scm_version --short)
 		res="$res${scm:++}"
 	fi

CONFIG_LOCALVERSION does not play any role here, the documented way to disable the plus sign is the LOCALVERSION environment or make variable:

make LOCALVERSION= all

Michal