Skip to content

Add 'LANG' to the environment filter to ensure it passes into brew if/when set in the user's environment#21945

Open
jamesrtnz wants to merge 3 commits intoHomebrew:mainfrom
jamesrtnz:main
Open

Add 'LANG' to the environment filter to ensure it passes into brew if/when set in the user's environment#21945
jamesrtnz wants to merge 3 commits intoHomebrew:mainfrom
jamesrtnz:main

Conversation

@jamesrtnz
Copy link
Copy Markdown

As per https://github.com/orgs/Homebrew/discussions/6785; currently, the end user's 'LANG' environment variable isn't included in the filter, so is dropped when 'brew' commands are run.

The knock-on impact of this is that the glibc 'postinstall' code which attempts to include the user's language support doesn't see any values for LANG, so they don't get included automatically.

This PR will resolve that; and will mean that future glibc updates (on Linux particularly) will include other languages besides en_US.UTF-8 if the end-user is using them.


  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests (excluding integration tests) for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.

Copy link
Copy Markdown
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Thanks!

Let's use one of the other bin/brew paths here and pass it through as HOMEBREW_LANG where it can specifically be set in the glibc postinstall code rather than being applied universally in all Homebrew formulae, casks and core code where it is (much) more likely to break things.

@jamesrtnz
Copy link
Copy Markdown
Author

OK; if I understand the codebase, that will be an update to env_config.rb, and also an update to the glibc formula?

@MikeMcQuaid
Copy link
Copy Markdown
Member

@MikeMcQuaid
Copy link
Copy Markdown
Member

that will set HOMEBREW_LANG from LANG automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants