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

Re: [PATCH v2 6/8] travis-ci: don't install 'language-pack-is' package

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Dec 19, 2017, 12:22 UTC
Message-ID
<CAM0VKjnctWRatbjB7EPHH+5zLjZLY+1umgFwz=bcV=g25eTD4w@mail.gmail.com>
In-Reply-To
<CAM0VKj=xVfCd5qR4jXwFGDxSABgyAeZY5qJxUP3GHvUE7gjw6A@mail.gmail.com>
On Mon, Dec 18, 2017 at 11:04 PM, SZEDER Gábor <szeder.dev@gmail.com> wrote:
Show 24 quoted lines
>   $ sudo apt-get install language-pack-is
>   [...]
>   $ ./t0204-gettext-reencode-sanity.sh
>   # lib-gettext: Found 'is_IS.utf8' as an is_IS UTF-8 locale
>   # lib-gettext: No is_IS ISO-8859-1 locale available
>   ok 1 - gettext: Emitting UTF-8 from our UTF-8 *.mo files / Icelandic
>   ok 2 - gettext: Emitting UTF-8 from our UTF-8 *.mo files / Runes
>   ok 3 # skip gettext: Emitting ISO-8859-1 from our UTF-8 *.mo files /
> Icelandic (missing GETTEXT_ISO_LOCALE)
>   ok 4 # skip gettext: impossible ISO-8859-1 output (missing GETTEXT_ISO_LOCALE)
>   ok 5 - gettext: Fetching a UTF-8 msgid -> UTF-8
>   ok 6 # skip gettext: Fetching a UTF-8 msgid -> ISO-8859-1 (missing
> GETTEXT_ISO_LOCALE)
>   ok 7 - gettext.c: git init UTF-8 -> UTF-8
>   ok 8 # skip gettext.c: git init UTF-8 -> ISO-8859-1 (missing
> GETTEXT_ISO_LOCALE)
>   # passed all 8 test(s)
>   1..8
>
> I'd expect something like this in the Travis CI build jobs as well, but
> prove hides the detailed output.
>
> It seems we would loose coverage with this patch, so it should be
> dropped.
Not so fast!

Notice how there are still a few tests skipped above, because of missing GETTEXT_ISO_LOCALE.

  # grep is_IS /etc/locale.gen
  # is_IS ISO-8859-1
  # is_IS.UTF-8 UTF-8
  # sed -i -e 's/^# is_IS/is_IS/' /etc/locale.gen
  # locale-gen
  Generating locales (this might take a while)...
  [...]
  is_IS.ISO-8859-1... done
  is_IS.UTF-8... done
  Generation complete.
Both UTF-8 and ISO Icelandic locales are generated, good.
  $ $ ./t0204-gettext-reencode-sanity.sh
  # lib-gettext: Found 'is_IS.utf8' as an is_IS UTF-8 locale
  # lib-gettext: Found 'is_IS.iso88591' as an is_IS ISO-8859-1 locale
  ok 1 - gettext: Emitting UTF-8 from our UTF-8 *.mo files / Icelandic
  ok 2 - gettext: Emitting UTF-8 from our UTF-8 *.mo files / Runes
  ok 3 - gettext: Emitting ISO-8859-1 from our UTF-8 *.mo files / Icelandic
  ok 4 - gettext: impossible ISO-8859-1 output
  ok 5 - gettext: Fetching a UTF-8 msgid -> UTF-8
  ok 6 - gettext: Fetching a UTF-8 msgid -> ISO-8859-1
  ok 7 - gettext.c: git init UTF-8 -> UTF-8
  ok 8 - gettext.c: git init UTF-8 -> ISO-8859-1
  # passed all 8 test(s)

And now all those tests are run, great! But look what happens without the language pack:

  # dpkg -P language-pack-is{,-base}
  [...]
  # grep is_IS /etc/locale.gen
  is_IS ISO-8859-1
  is_IS.UTF-8 UTF-8
  buzz ~# locale-gen
  Generating locales (this might take a while)...
  [...]
  is_IS.ISO-8859-1... done
  is_IS.UTF-8... done
  Generation complete.
Still both Icelandic locales are generated.
  $ ./t0204-gettext-reencode-sanity.sh
  # lib-gettext: Found 'is_IS.utf8' as an is_IS UTF-8 locale
  # lib-gettext: Found 'is_IS.iso88591' as an is_IS ISO-8859-1 locale
  ok 1 - gettext: Emitting UTF-8 from our UTF-8 *.mo files / Icelandic
  ok 2 - gettext: Emitting UTF-8 from our UTF-8 *.mo files / Runes
  ok 3 - gettext: Emitting ISO-8859-1 from our UTF-8 *.mo files / Icelandic
  ok 4 - gettext: impossible ISO-8859-1 output
  ok 5 - gettext: Fetching a UTF-8 msgid -> UTF-8
  ok 6 - gettext: Fetching a UTF-8 msgid -> ISO-8859-1
  ok 7 - gettext.c: git init UTF-8 -> UTF-8
  ok 8 - gettext.c: git init UTF-8 -> ISO-8859-1
  # passed all 8 test(s)
And still all those tests are run!

I did run all test scripts sourcing 'lib-gettext.sh' with both locales generated and didn't see any errors, independently from whether the language pack was installed or not. I still have a few skipped tests (because of no GETTEXT_POISON and something PCRE-related), but those, too, are independent from the language pack.

So it seems that we don't need 'language-pack-is' after all; what we do need are the ISO and UTF-8 Icelandic locales. Not sure we can modify /etc/locale.gen without sudo in the Travis CI build job, though, and I've run out of time to try.

Gábor
Previous: Junio C HamanoNext: SZEDER Gábor
Message 25 of 44 in “travis-ci: fix running P4 and Git LFS tests in Linux build jobs”
  1. travis-ci: fix running P4 and Git LFS tests in Linux build jobsSZEDER Gábor, Nov 1, 2017
  2. 0/4 travis-ci: clean up setting environment variablesSZEDER Gábor, Dec 11, 2017
  3. 1/4 travis-ci: use 'set -x' in 'ci/*' scripts for extra tracing outputSZEDER Gábor, Dec 11, 2017
  4. Lars SchneiderDec 12, 2017
  5. SZEDER GáborDec 12, 2017
  6. Lars SchneiderDec 13, 2017
  7. SZEDER GáborDec 14, 2017
  8. Johannes SchindelinDec 15, 2017
  9. SZEDER GáborDec 15, 2017
  10. Johannes SchindelinDec 15, 2017
  11. 2/4 travis-ci: introduce a $jobname variable for 'ci/*' scriptsSZEDER Gábor, Dec 11, 2017
  12. 3/4 travis-ci: move setting environment variables to 'ci/lib-travisci.sh'SZEDER Gábor, Dec 11, 2017
  13. 4/4 travis-ci: set GIT_TEST_HTTPD in 'ci/lib-travisci.sh'SZEDER Gábor, Dec 11, 2017
  14. 0/8 Travis CI cleanupsSZEDER Gábor, Dec 16, 2017
  15. 1/8 travis-ci: use 'set -x' in select 'ci/*' scripts for extra tracingSZEDER Gábor, Dec 16, 2017
  16. 2/8 travis-ci: introduce a $jobname variable for 'ci/*' scriptsSZEDER Gábor, Dec 16, 2017
  17. 3/8 travis-ci: move setting environment variables to 'ci/lib-travisci.sh'SZEDER Gábor, Dec 16, 2017
  18. 4/8 travis-ci: set GIT_TEST_HTTPD in 'ci/lib-travisci.sh'SZEDER Gábor, Dec 16, 2017
  19. 5/8 travis-ci: don't install default addon packages for the 32 bit Linux buildSZEDER Gábor, Dec 16, 2017
  20. 6/8 travis-ci: don't install 'language-pack-is' packageSZEDER Gábor, Dec 16, 2017
  21. Lars SchneiderDec 18, 2017
  22. SZEDER GáborDec 18, 2017
  23. Lars SchneiderDec 18, 2017
  24. Junio C HamanoDec 18, 2017
  25. SZEDER GáborDec 19, 2017
  26. 7/8 travis-ci: save prove state for the 32 bit Linux buildSZEDER Gábor, Dec 16, 2017
  27. 8/8 travis-ci: only print test failures if there are test results availableSZEDER Gábor, Dec 16, 2017
  28. Eric SunshineDec 16, 2017
  29. SZEDER GáborDec 16, 2017
  30. Eric SunshineDec 17, 2017
  31. Johannes SchindelinDec 16, 2017
  32. Lars SchneiderDec 18, 2017
  33. Lars SchneiderDec 18, 2017
  34. 0/4 Rest of the Travis CI fixesSZEDER Gábor, Dec 27, 2017
  35. 1/4 travis-ci: fine tune the use of 'set -x' in 'ci/*' scriptsSZEDER Gábor, Dec 27, 2017
  36. Lars SchneiderDec 27, 2017
  37. 2/4 travis-ci: don't install default addon packages for the 32 bit Linux buildSZEDER Gábor, Dec 27, 2017
  38. Lars SchneiderDec 27, 2017
  39. 3/4 travis-ci: save prove state for the 32 bit Linux buildSZEDER Gábor, Dec 27, 2017
  40. Lars SchneiderDec 27, 2017
  41. SZEDER GáborDec 27, 2017
  42. Lars SchneiderDec 28, 2017
  43. 4/4 travis-ci: only print test failures if there are test results availableSZEDER Gábor, Dec 27, 2017
  44. Lars SchneiderDec 27, 2017

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.