Skip to contentSkip to conversation

kbuild: fix LOCALVERSION handling to match description

PATCH In review Andy Whitcroft 3 participants 3 messages Jun 14, 2010 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbuild: fix LOCALVERSION handling to match description

In the commit below the version string handling was modified, adding a '+' where no other version information was supplied:

    commit 85a256d8e0116c8f5ad276730830f5d4d473344d
    Author: David Rientjes <[email protected]>
    Date:   Wed Jan 13 13:01:05 2010 -0800

From the commit the intent was as below:

- when CONFIG_LOCALVERSION_AUTO is disabled, a `+' is appended if the repository has been revised beyond a tagged commit and LOCALVERSION= was not passed to "make".

However if the user supplies an empty LOCALVERSION on the command line the plus suffix is still added. This form is useful in the case where the build environment knows that the version as specified is correct and complete but does not correspond to a specific tag.

This patch changes the implementation to match the documentation such that specifying LOCALVERSION= on the build line is sufficient to suppress any suffix.

---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +1 -1
index d49d96c..662e820 100644
@@ -944,7 +944,7 @@ ifdef CONFIG_LOCALVERSION_AUTO
 	localver-extra = $(scm-identifier)
 else
 	ifneq ($(scm-identifier),)
-		ifeq ($(LOCALVERSION),)
+		ifeq ("$(origin LOCALVERSION)", "undefined")
 			localver-extra = +
 		endif
 	endif
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 32 lines · Andy Whitcroft

In the commit below the version string handling was modified, adding a '+' where no other version information was supplied:

    commit 85a256d8e0116c8f5ad276730830f5d4d473344d
    Author: David Rientjes <[email protected]>
    Date:   Wed Jan 13 13:01:05 2010 -0800

From the commit the intent was as below:

- when CONFIG_LOCALVERSION_AUTO is disabled, a `+' is appended if the repository has been revised beyond a tagged commit and LOCALVERSION= was not passed to "make".

However if the user supplies an empty LOCALVERSION on the command line the plus suffix is still added. This form is useful in the case where the build environment knows that the version as specified is correct and complete but does not correspond to a specific tag.

This patch changes the implementation to match the documentation such that specifying LOCALVERSION= on the build line is sufficient to suppress any suffix.

---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +0 -0
index d49d96c..662e820 100644

Makefile ifdef CONFIG_LOCALVERSION_AUTO · line 950

Quoted 8 lines
Makefile +1 -1
@@ -944,7 +944,7 @@ ifdef CONFIG_LOCALVERSION_AUTO
 	localver-extra = $(scm-identifier)
 else
 	ifneq ($(scm-identifier),)
-		ifeq ($(LOCALVERSION),)
+		ifeq ("$(origin LOCALVERSION)", "undefined")
 			localver-extra = +
 		endif
 	endif

David, do you Ack this change? To me this seems like a reasonable compromise.

Michal

Acked-by on v1 1/1
#2 lore raw
In reply to Andy Whitcroft
Quoted 18 lines · Andy Whitcroft

In the commit below the version string handling was modified, adding a '+' where no other version information was supplied:

    commit 85a256d8e0116c8f5ad276730830f5d4d473344d
    Author: David Rientjes <[email protected]>
    Date:   Wed Jan 13 13:01:05 2010 -0800

From the commit the intent was as below:

- when CONFIG_LOCALVERSION_AUTO is disabled, a `+' is appended if the repository has been revised beyond a tagged commit and LOCALVERSION= was not passed to "make".

However if the user supplies an empty LOCALVERSION on the command line the plus suffix is still added. This form is useful in the case where the build environment knows that the version as specified is correct and complete but does not correspond to a specific tag.

Quoted 5 lines

This patch changes the implementation to match the documentation such that specifying LOCALVERSION= on the build line is sufficient to suppress any suffix.

This should be pushed for rc4.