2010-08-13 15:00:20

by Dan McGee

[permalink] [raw]
Subject: Fwd: setlocalversion changes trigger regression if build scripts in git

commit 09155120cf0ffe6f0c8aba3aa625831405b65996
Author: Michal Marek <[email protected]>
Date:   Thu Jun 17 15:14:58 2010 +0200

   kbuild: Clean up and speed up the localversion logic

This commit causes a regression if you have some of your kernel
building and packaging scripts in git. It can be triggered with
LOCALVERSION_AUTO being enabled or disabled. An example that hopefully
illustrates the situation. The source is simply an extracted tarball
with the 2.6.35.1 patch applied.

dmcgee@dublin ~/projects/eee/kernel-eee/src/linux-2.6.35 (master)
$ grep LOCALVERSION .config
CONFIG_LOCALVERSION="eee"
# CONFIG_LOCALVERSION_AUTO is not set
dmcgee@dublin ~/projects/eee/kernel-eee/src/linux-2.6.35 (master)
$ ./scripts/setlocalversion
eee+
dmcgee@dublin ~/projects/eee/kernel-eee/src/linux-2.6.35 (master)
$ cp -ar . /tmp/not-in-git
dmcgee@dublin ~/projects/eee/kernel-eee/src/linux-2.6.35 (master)
$ cd /tmp/foobar/
dmcgee@dublin /tmp/not-in-git
$ ./scripts/setlocalversion
eee

Note that when in git, you get the appended "+" sign. If
LOCALVERSION_AUTO is set, you will get something like
"eee-gb01b08c-dirty" (whereas the copy of the tree in /tmp still
returns "eee"). It doesn't matter whether the working tree is dirty or
clean.

Is there a way to disable this? I'm building from a clean tarball that
just happens to be unpacked inside a git repository. One would think
setting LOCALVERSION_AUTO to false would do it, but no such luck...

-Dan