From: Gabriel C <nix.or.die@googlemail.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Subject: bug in scripts/setlocalversion
Date: Sat, 17 Nov 2007 05:24:07 +0100 [thread overview]
Message-ID: <473E6CE7.4010606@googlemail.com> (raw)
Hi,
I've build by 'accident' and stable kernel inside a git repo and noticed an strange bug.
setlocalversion will append a git revision to the kernel even is not an git one.
to reproduce create some dir and cd in there:
git init
git config user.email "foo@email.com"
git config user.name "blah"
touch a b c
git add *
git commit -a
git rev-parse --verify HEAD 2
7e671bce0cdc4ace727794dc79d5b426551ae5b8
now get any kernel tarball from kernel.org , unpack and build it with make V=1
--($:/work/crazy/bug/linux-2.6.24-rc2)-- LC_ALL=C; ls -d .git
/usr/bin/ls: cannot access .git: No such file or directory
( we are not git )
...
--($:/work/crazy/bug/linux-2.6.24-rc2)-- make V=1
rm -f include/config/kernel.release
echo 2.6.24-rc2-g7e671bce > include/config/kernel.release <-- buggy
...
Possible fix is to add and check before :
# Check for git and a git repo.
if head=`git rev-parse --verify HEAD 2>/dev/null`; then
which actually is missing the 'git' check ;)
if [ -d ".git" ]; then
if head=`git rev-parse --verify HEAD 2>/dev/null`; then
...
fi
or some git magic command I don't know yet =)
Regards,
Gabriel
reply other threads:[~2007-11-17 4:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=473E6CE7.4010606@googlemail.com \
--to=nix.or.die@googlemail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.