From: Pavel Roskin <proski@gnu.org>
To: linux-kernel@vger.kernel.org
Subject: Suppressing a plus from setlocalversion
Date: Mon, 15 Aug 2011 17:37:06 -0400 [thread overview]
Message-ID: <20110815173706.12ccfdd4@mj> (raw)
Hello!
There is one annoyance in the build system that I cannot work around.
Before I attempt hacking the code, I'd like to make sure I'm not
missing anything obvious.
Suppose that I have a kernel version 3.1-rc2. I want to test some patch
for some code that is compiled as a module. I change the code and
create a patch with STGit. I recompile the modules, install them by
"make module_install", unload the module I patched, load it again
and find that there is no effect from my change. It turns out that the
modules were installed to "/lib/modules/3.1.0-rc2+" and the plus was
added by scripts/localversion because the source tree is now modified.
So I recompile the whole kernel, reboot and continue working on my
patch. Many days later, I'm about to send my patch, but I want to
retest the system without it, so I "stg pop" it, recompile the
module, install it and find that the unpatched module behaves just like
the patched one. Of course, it turns out that the unpatched
module ended up in "/lib/modules/3.1.0-rc2", whereas modprobe keeps
loading the modified module from "/lib/modules/3.1.0-rc2+"
CONFIG_LOCALVERSION_AUTO is unset, but that doesn't stop
scripts/localversion from adding the plus. Setting CONFIG_LOCALVERSION
doesn't help. Setting LOCALVERSION on the make command line helps, but
it needs to be done every time, and it's too easy to forget. I don't
want to write a wrapper around make, it would be too intrusive
(actually, it's my solution for now).
Adding anything to localversion* doesn't suppress the plus. Keeping
some patch in STGit all the time is quite annoying, I'll eventually end
up sending it to some mailing list by mistake. STGit cannot hide
applied patches. Besides, I'll need to be aware of the patch when
switching branches.
File .scmversion is only read from the source directory, so having it
is equivalent to having a modified source all the time, which is what
I'm trying to avoid. Sure, I can keep .scmversion not in git, but I
risk to clean it up with "git clean" eventually.
If there is no simple solution with the existing code, maybe
non-empty CONFIG_LOCALVERSION should suppress the plus just like
LOCALVERSION?
Or maybe CONFIG_LOCALVERSION_AUTO should be not yes/no, but
full/minimal/no?
--
Regards,
Pavel Roskin
next reply other threads:[~2011-08-15 21:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-15 21:37 Pavel Roskin [this message]
2011-08-15 23:06 ` Suppressing a plus from setlocalversion David Rientjes
2011-08-16 2:21 ` Pavel Roskin
2011-08-16 13:24 ` Stefan Richter
2011-08-16 15:35 ` Pavel Roskin
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=20110815173706.12ccfdd4@mj \
--to=proski@gnu.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox