lkml.org 
[lkml]   [2007]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH,RFC 1/3] Change CONFIG_LOCALVERSION_AUTO to use a git-describe-ish format
Date
Change the automatic local version to have the form -nnnnn-gSHA1SUMID,
where 'nnnnn' is the number of commits since the last tag (i.e.,
2.6.21-rc7). This makes it much more likely that the package names created
for the kernel will look "newer" to a package manager.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
scripts/setlocalversion | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 82e4993..20711f5 100644
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -12,7 +12,7 @@ cd "${1:-.}" || usage
if head=`git rev-parse --verify HEAD 2>/dev/null`; then
# Do we have an untagged version?
if git name-rev --tags HEAD | grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then
- printf '%s%s' -g `echo "$head" | cut -c1-8`
+ git-describe | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
fi

# Are there uncommitted changes?
--
1.5.3.4.499.g1104e-dirty
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-11-03 02:57    [W:0.050 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site