Summary: | emerge allows variables in /etc/profile to override those in the calling environment | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Timothy Stotts <devel> |
Component: | Core - Interface (emerge) | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | ||
Priority: | High | ||
Version: | 2.0 | ||
Hardware: | PPC | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Emerge info output with sensitive information removed. |
Description
Timothy Stotts
2006-04-01 11:05:01 UTC
Created attachment 83643 [details]
Emerge info output with sensitive information removed.
One example of why this is an issue for users with unicode locales. See: bug 125998 http://bugs.gentoo.org/show_bug.cgi?id=125998 works fine for me added `locale` to the src_install() func of sandboxshell package: # emerge sandboxshell ... >>> Install sandboxshell-0.3 into /var/tmp/portage/sandboxshell-0.3/image/ LANG= LC_CTYPE="POSIX" LC_NUMERIC="POSIX" ... # LC_ALL=C emerge sandboxshell ... >>> Install sandboxshell-0.3 into /var/tmp/portage/sandboxshell-0.3/image/ LANG= LC_CTYPE="C" LC_NUMERIC="C" ... # LC_ALL=en_US emerge sandboxshell ... >>> Install sandboxshell-0.3 into /var/tmp/portage/sandboxshell-0.3/image/ LANG= LC_CTYPE="en_US" LC_NUMERIC="en_US" ... (In reply to comment #3) Sorry, but the bug says the the LC_ALL doesn't propagate if it is set in the global environment. It is not set in your global environment, as shown by your command: emerge sandboxshell ... >>> Install sandboxshell-0.3 into /var/tmp/portage/sandboxshell-0.3/image/ LANG= LC_CTYPE="POSIX" LC_NUMERIC="POSIX" You need to set the global locale first, such that all logins already have a value of LC_ALL. Then emerge fails to override that value. I set the global locale to: LC_ALL="en_US.utf-8" via the file /etc/env.d/02locale Now, to reproduce your test: locale; LC_ALL="C" sudo emerge sandboxshell LANG= ... LC_ALL=en_US.utf8 Calculating dependencies ...done! >>> emerge (1 of 1) app-shells/sandboxshell-0.3 to / >>> md5 files ;-) sandboxshell-0.3.ebuild ... >>> Install sandboxshell-0.3 into /var/tmp/portage/sandboxshell-0.3/image/ category app-shells LANG= LC_CTYPE="en_US.utf-8" ... LC_ALL=en_US.utf-8 i was working off of your summary rather than comments your comment (6) is invalid, that is expected behavior changing summary to be accurate since this isnt LC_ALL specific at all Allowing the calling env to override the build env is a recipe for unpredictable results. Therefore, I'd say that it should be optional and non-default. We can recommend /etc/portage/bashrc as the preferred means to override the env. (In reply to comment #7) Yes. Modifying /etc/portage/bashrc works. But I don't wish to edit it every time I perform an emerge. I suppose a set of case statements on $CATEGORY and $P in /etc/portage/bashrc could work, but manual setting of a particular environment variable from the 'emerge' command would be ideal. Duplicating the behavior of /bin/env is the desired behavior. Propose: - /etc/portage/package.env - emerge --env VARIABLE=VALUE ... Most documentation and discussions indicate use of: VARIABLE=VALUE emerge ... But this will not work across all systems, depending on /etc/env.d, /etc/profile.d, and /etc/profile . |