* [PATCH] Unset LANG in setlocalversion script
@ 2013-02-21 12:49 Christophe Leroy
2013-02-21 21:14 ` Michal Marek
0 siblings, 1 reply; 3+ messages in thread
From: Christophe Leroy @ 2013-02-21 12:49 UTC (permalink / raw)
To: Michal Marek; +Cc: linux-kernel, linux-kbuild
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 673 bytes --]
This patch allows the use of setlocalversion script regardless of the LANG
parameter. Otherwise, the `svn info 2>/dev/null | grep '^Last Changed Rev'`
returns nothing because for instance, in French the text 'Last Changed Rev'
is replaced by 'Révision de la dernière modification'
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
diff -ur linux-3.7.9/scripts/setlocalversion linux/scripts/setlocalversion
--- linux-3.7.9/scripts/setlocalversion 2013-02-17 19:53:32.000000000 +0100
+++ linux/scripts/setlocalversion 2012-11-03 03:15:32.000000000 +0100
@@ -9,6 +9,8 @@
#
#
+unset LANG
+
usage() {
echo "Usage: $0 [--save-scmversion] [srctree]" >&2
exit 1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Unset LANG in setlocalversion script
2013-02-21 12:49 [PATCH] Unset LANG in setlocalversion script Christophe Leroy
@ 2013-02-21 21:14 ` Michal Marek
2013-02-22 8:56 ` leroy christophe
0 siblings, 1 reply; 3+ messages in thread
From: Michal Marek @ 2013-02-21 21:14 UTC (permalink / raw)
To: Christophe Leroy; +Cc: linux-kernel, linux-kbuild
Dne 21.2.2013 13:49, Christophe Leroy napsal(a):
> This patch allows the use of setlocalversion script regardless of the LANG
> parameter. Otherwise, the `svn info 2>/dev/null | grep '^Last Changed Rev'`
> returns nothing because for instance, in French the text 'Last Changed Rev'
> is replaced by 'Révision de la derničre modification'
Unsetting LANG might not be enough. You should unset LC_ALL and set
LC_MESSAGES=C. But - is this a problem for other commands in the script?
>From a quick look, we only parse English output of svn, so I suggest to
only set the env var for the svn command.
Michal
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Unset LANG in setlocalversion script
2013-02-21 21:14 ` Michal Marek
@ 2013-02-22 8:56 ` leroy christophe
0 siblings, 0 replies; 3+ messages in thread
From: leroy christophe @ 2013-02-22 8:56 UTC (permalink / raw)
To: Michal Marek; +Cc: linux-kernel, linux-kbuild
Le 21/02/2013 22:14, Michal Marek a écrit :
> Dne 21.2.2013 13:49, Christophe Leroy napsal(a):
>> This patch allows the use of setlocalversion script regardless of the LANG
>> parameter. Otherwise, the `svn info 2>/dev/null | grep '^Last Changed Rev'`
>> returns nothing because for instance, in French the text 'Last Changed Rev'
>> is replaced by 'Révision de la derničre modification'
> Unsetting LANG might not be enough. You should unset LC_ALL and set
> LC_MESSAGES=C. But - is this a problem for other commands in the script?
> From a quick look, we only parse English output of svn, so I suggest to
> only set the env var for the svn command.
>
> Michal
>
Ok, I will propose a new patch.
I confirm my only issue at the time being is with the svn command.
Christophe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-02-22 8:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-21 12:49 [PATCH] Unset LANG in setlocalversion script Christophe Leroy
2013-02-21 21:14 ` Michal Marek
2013-02-22 8:56 ` leroy christophe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).