From: Frans Pop <elendil@planet.nl>
To: paulmck@linux.vnet.ibm.com
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
linux-kernel@vger.kernel.org, zippel@linux-m68k.org,
mingo@elte.hu, akpm@linux-foundation.org,
torvalds@linux-foundation.org
Subject: Re: [PATCH RFC] kconfig: place git SHA1 in .config output if in git tree
Date: Tue, 2 Mar 2010 16:19:32 +0100 [thread overview]
Message-ID: <201003021619.34793.elendil@planet.nl> (raw)
In-Reply-To: <20100302011633.GJ6758@linux.vnet.ibm.com>
On Tuesday 02 March 2010, Paul E. McKenney wrote:
> Sigh! Because popen() doesn't fail when the command is bogus, it seems.
> I now do stat() to check for it existing, and that seems to handle the
> remote-output case.
Cool. Did you check if it's really necessary to treat the two cases
separately? I would expect srctree to always be set, and if I read the
root Makefile correctly that's indeed the case:
srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR))
Hmm. I see you've switched from SRCTREE to KBUILD_SRC. Is that correct?
SCRTREE is also used elsewhere in the same file and that's the variable
(in lower case; the upper case variant is a C define) that's explicitly
exported in the root Makefile.
> > One other thing. I wonder if this implementation will always reliably
> > result in the *current* SHA1 being included in the .config. AFAICT
> > the .config only actually gets written if there are changes, or if you
> > explicitly do a 'make oldconfig'.
> >
> > But if you e.g. pull a stable update and just run 'make', the .config
> > will likely remain unchanged and will thus still contain the SHA1 from
> > a previous build.
>
> Good point. But the same is true of the Linux kernel version
> identifier, right?
Right. But the increased precision of the SHA1 IMO also demands an
increased reliability of its accuracy: if it's not accurate it loses its
value.
Personally I think that maybe the config file is not the correct place for
this. For one thing users may well send a config file that's not the 100%
exact one used to build the kernel when they know it's close enough that
it makes no practical difference (I know I've done so in the past).
Wouldn't it be more logical to include the line in the dmesg output? My
preference would be a separate line below the existing (Linux version)
line. That line could only be output if the kernel was built from a VCS.
It could then even be repeated in oops output.
That would also solve the problem of the config file not being updated.
Paul E. McKenney wrote:
>> I'd hate to have that run every time I make a kernel.
>
> Good point... Should we have an environment variable that controls this
> behavior?
I would suggest at most a general enabled/disabled switch (distros might
prefer to disable it too), and not more detailed settings to control
whether or not to include dirty or whatnot.
Cheers,
FJP
next prev parent reply other threads:[~2010-03-02 15:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-01 4:22 [PATCH RFC] kconfig: place git SHA1 in .config output if in git tree Paul E. McKenney
2010-03-01 8:34 ` Ingo Molnar
2010-03-01 9:42 ` Frans Pop
2010-03-01 10:10 ` Geert Uytterhoeven
2010-03-01 16:27 ` Paul E. McKenney
2010-03-01 16:53 ` Frans Pop
2010-03-01 18:16 ` Paul E. McKenney
2010-03-01 20:29 ` Frans Pop
2010-03-02 1:16 ` Paul E. McKenney
2010-03-02 15:19 ` Frans Pop [this message]
2010-03-03 0:01 ` Paul E. McKenney
2010-03-03 0:42 ` Frans Pop
2010-03-03 2:19 ` Paul E. McKenney
2010-03-01 16:22 ` Linus Torvalds
2010-03-01 16:48 ` Paul E. McKenney
2010-03-01 20:46 ` James Cloos
2010-03-02 1:20 ` Paul E. McKenney
2010-03-02 1:53 ` James Cloos
2010-03-02 5:21 ` Paul E. McKenney
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=201003021619.34793.elendil@planet.nl \
--to=elendil@planet.nl \
--cc=akpm@linux-foundation.org \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulmck@linux.vnet.ibm.com \
--cc=torvalds@linux-foundation.org \
--cc=zippel@linux-m68k.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox