git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] explicitly set LANG to 'C' in for guilt run-tests

From
JSJosef Jeff Sipek <jsipek@cs.sunysb.edu>
Date
Sep 29, 2008, 20:49 UTC
Message-ID
<20080929204958.GD31590@josefsipek.net>
In-Reply-To
<237967ef0809291325p7a0e3581vac348a1e99dbd4ed@mail.gmail.com>
On Mon, Sep 29, 2008 at 10:25:48PM +0200, Mikael Magnusson wrote:
Show 33 quoted lines
> 2008/9/29 Scott Moser <smoser@brickies.net>:
> > The output of guilt's run-tests is dependent on LANG due to reliance on a
> > given sorting algorithm. Currently, the test '052' will fail if LANG is
> > set to 'en_US.UTF-8' (and likely others values).
> >
> > Remove the assumption by explicitly setting this in run-tests.
> >
> > Signed-off-by: Scott Moser <smoser@brickies.net>
> > ---
> >  regression/run-tests |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/regression/run-tests b/regression/run-tests
> > index 8f572eb..945150b 100755
> > --- a/regression/run-tests
> > +++ b/regression/run-tests
> > @@ -2,6 +2,7 @@
> >
> >  export REG_DIR="$PWD"
> >  export PATH="$PWD/bin:$PATH"
> > +export LANG=C
> >
> >  source scaffold
> >
> > --
> > 1.5.6.3
> 
> If I'm not mistaken, $LANG is used as the ultimate fallback, while LC_ALL is
> the one that overrides all others, so you probably want to set LC_ALL. I'm
> unsure which off the specific ones would apply here, but very likely it's
> LC_COLLATE. In other words, if LC_ALL is set, it is used, otherwise if
> LC_COLLATE is set it is used, otherwise if LANG is set, it is used,
> otherwise, "POSIX" is used.

IIRC, my devel system has all of them set to UTF8, _except_ LC_COLLATE (I like the case sensitive sort of filenames in ls(1)) which I have set to "C". So chances are that the minimum required is LC_COLLATE=C, but overriding everything might be safer overall.

Josef 'Jeff' Sipek.
-- 
Penguin : Linux version 2.6.25.4 on an i386 machine (6135.73 BogoMips).
Previous: Mikael MagnussonNext: Scott Moser
Message 3 of 5 in “explicitly set LANG to 'C' in for guilt run-tests”
  1. explicitly set LANG to 'C' in for guilt run-testsScott Moser, Sep 29, 2008
  2. Mikael MagnussonSep 29, 2008
  3. Josef Jeff SipekSep 29, 2008
  4. Scott MoserSep 29, 2008
  5. Josef 'Jeff' SipekSep 30, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.