Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gettext: Add macOS warning patch #78820

Merged
merged 2 commits into from Jan 31, 2020
Merged

Conversation

kirelagin
Copy link
Member

@kirelagin kirelagin commented Jan 30, 2020

gettext 0.20 fixed a bug with handling locale on macOS, but this caused
it to report an annoying warning on systems where “language”
differs from “region”. See Homebrew issue for details:
Homebrew/homebrew-core#41139.

Add upstream patch that has not been released yet.
Details:
https://www.mail-archive.com/bug-gnulib@gnu.org/msg36768.html.

Motivation for this change
Warning: Failed to set locale category
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@kirelagin
Copy link
Member Author

cc @zimbatm @vrthra

@veprbl
Copy link
Member

veprbl commented Jan 30, 2020

Nice! Needs to target the staging branch, though.

@kirelagin kirelagin changed the base branch from master to staging January 31, 2020 02:22
gettext 0.20 fixed a bug with handling locale on macOS, but this caused
it to report an annoying warning on systems where “language”
differs from “region”. See Homebrew issue for details:
<Homebrew/homebrew-core#41139>.

Add upstream patch that has not been released yet.
Details:
<https://www.mail-archive.com/bug-gnulib@gnu.org/msg36768.html>.
@kirelagin
Copy link
Member Author

Done and done.

@veprbl veprbl added this to WIP in Staging via automation Jan 31, 2020
@veprbl veprbl moved this from WIP to Needs review in Staging Jan 31, 2020
Staging automation moved this from Needs review to Ready Jan 31, 2020
Copy link
Member

@veprbl veprbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as intended:

[nix-shell:~/.cache/nix-review/pr-78820-1/nixpkgs]$ git checkout refs/nix-review/0
Previous HEAD position was d9e4fc31ea7 gettext: Add macOS warning patch
HEAD is now at 16ffc74a323 Merge pull request #71557 from r-ryantm/auto-update/enchant

[nix-shell:~/.cache/nix-review/pr-78820-1/nixpkgs]$ LC_ALL=en_RU.UTF-8 nix-shell -Q -I nixpkgs=`pwd` -p wget --run wget
bash: warning: setlocale: LC_ALL: cannot change locale (en_RU.UTF-8): No such file or directory
Warning: Failed to set locale category LC_NUMERIC to en_RU.UTF-8.
Warning: Failed to set locale category LC_TIME to en_RU.UTF-8.
Warning: Failed to set locale category LC_COLLATE to en_RU.UTF-8.
Warning: Failed to set locale category LC_MONETARY to en_RU.UTF-8.
Warning: Failed to set locale category LC_MESSAGES to en_RU.UTF-8.
wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.

[nix-shell:~/.cache/nix-review/pr-78820-1/nixpkgs]$ git checkout refs/nix-review/1
Previous HEAD position was 16ffc74a323 Merge pull request #71557 from r-ryantm/auto-update/enchant
HEAD is now at d9e4fc31ea7 gettext: Add macOS warning patch

[nix-shell:~/.cache/nix-review/pr-78820-1/nixpkgs]$ LC_ALL=en_RU.UTF-8 nix-shell -Q -I nixpkgs=`pwd` -p wget --run wget
bash: warning: setlocale: LC_ALL: cannot change locale (en_RU.UTF-8): No such file or directory
wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.

@kirelagin
Copy link
Member Author

Feel free to squash and merge or drop the last commit and merge, as you see fit.

@LnL7 LnL7 merged commit 9078ca6 into NixOS:staging Jan 31, 2020
Staging automation moved this from Ready to Done Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Staging
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants