Skip to content

Commit

Permalink
kbuild: change CONFIG_LOCALVERSION_AUTO to use a git-describe-ish format
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
  • Loading branch information
Theodore Ts'o authored and Sam Ravnborg committed Jan 28, 2008
1 parent 22d6a6a commit d882421
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/setlocalversion
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit d882421

Please sign in to comment.