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
12if head=`git rev-parse --verify HEAD 2>/dev/null`; then12if head=`git rev-parse --verify HEAD 2>/dev/null`; then
13 # Do we have an untagged version?13 # Do we have an untagged version?
14 if git name-rev --tags HEAD | grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then14 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))}'
16 fi16 fi
17 17
18 # Are there uncommitted changes?18 # Are there uncommitted changes?

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t