Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH] Fix LOCALVERSION append plus logic

76 views
Skip to first unread message

alan...@freescale.com

unread,
Oct 7, 2010, 4:20:01 PM10/7/10
to
From: Alan Tull <alan...@freescale.com>

This change fixes the logic to do what the comment says
when CONFIG_LOCALVERSION_AUTO and CONFIG_LOCALVERSION are
both not set.

Also fix a spelling error in the comment.

If the kernel tree is in git, here's the config
permutations (with CONFIG_LOCALVERSION_AUTO turned off)
and the image name resulting:

CONFIG_LOCALVERSION=""
results:
patched : Linux-2.6.35.3+
unpatched : Linux-2.6.35.3

CONFIG_LOCALVERSION="-something"
results:
patched : Linux-2.6.35.3-something
unpatched : Linux-2.6.35.3-something+

Signed-off-by: Alan Tull <alan...@freescale.com>
---
scripts/setlocalversion | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 64a9cb5..4488a33 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -160,9 +160,9 @@ if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
# full scm version string
res="$res$(scm_version)"
else
- # apped a plus sign if the repository is not in a clean tagged
+ # append a plus sign if the repository is not in a clean tagged
# state and LOCALVERSION= is not specified
- if test "${LOCALVERSION+set}" != "set"; then
+ if test "$CONFIG_LOCALVERSION" = ""; then
scm=$(scm_version --short)
res="$res${scm:++}"
fi
--
1.6.0.4


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Michal Marek

unread,
Oct 8, 2010, 10:10:02 AM10/8/10
to
On 7.10.2010 22:18, alan...@freescale.com wrote:
> From: Alan Tull <alan...@freescale.com>
>
> This change fixes the logic to do what the comment says
> when CONFIG_LOCALVERSION_AUTO and CONFIG_LOCALVERSION are
> both not set.
>
> Also fix a spelling error in the comment.
>
> If the kernel tree is in git, here's the config
> permutations (with CONFIG_LOCALVERSION_AUTO turned off)
> and the image name resulting:
>
> CONFIG_LOCALVERSION=""
> results:
> patched : Linux-2.6.35.3+

That's a result of patching the kernel and thus moving away from the
v2.6.35.3 tag.


> unpatched : Linux-2.6.35.3
>
> CONFIG_LOCALVERSION="-something"
> results:
> patched : Linux-2.6.35.3-something
> unpatched : Linux-2.6.35.3-something+

Dunno how you got this, was it really a clean 2.6.35.3?


> Signed-off-by: Alan Tull <alan...@freescale.com>
> ---
> scripts/setlocalversion | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/setlocalversion b/scripts/setlocalversion
> index 64a9cb5..4488a33 100755
> --- a/scripts/setlocalversion
> +++ b/scripts/setlocalversion
> @@ -160,9 +160,9 @@ if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
> # full scm version string
> res="$res$(scm_version)"
> else
> - # apped a plus sign if the repository is not in a clean tagged
> + # append a plus sign if the repository is not in a clean tagged
> # state and LOCALVERSION= is not specified
> - if test "${LOCALVERSION+set}" != "set"; then
> + if test "$CONFIG_LOCALVERSION" = ""; then
> scm=$(scm_version --short)
> res="$res${scm:++}"
> fi

CONFIG_LOCALVERSION does not play any role here, the documented way to
disable the plus sign is the LOCALVERSION environment or make variable:

make LOCALVERSION= all

Michal

0 new messages