History

kbuild: change CONFIG_LOCALVERSION_AUTO to use a git-describe-ish format

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.

Theodore Ts'o committed 19 years ago

Commit d8824211 parent 22d6a6a1 file · +1 −1Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/setlocalversion+1−1
@@ -12,7 +12,7 @@ cd "${1:-.}" || usage · 11 unmodified lines
1212 if head=`git rev-parse --verify HEAD 2>/dev/null`; then
1313 # Do we have an untagged version?
1414 if git name-rev --tags HEAD | grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then
15− printf '%s%s' -g `echo "$head" | cut -c1-8`
15+ git describe | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
1616 fi
1717
1818 # Are there uncommitted changes?