FS#9486 - makepkg uses Arch-specific /etc/profile.d/
Attached to Project:
Pacman
Opened by Dan McGee (toofishes) - Thursday, 07 February 2008, 14:52 GMT
Last edited by Allan McRae (Allan) - Wednesday, 30 July 2008, 05:44 GMT
Opened by Dan McGee (toofishes) - Thursday, 07 February 2008, 14:52 GMT
Last edited by Allan McRae (Allan) - Wednesday, 30 July 2008, 05:44 GMT
|
Details
Summary and Info:
makepkg still sources individual files in /etc/profile.d/*, which could be Arch-specific. Instead, we should probably just source /etc/profile so we have a clean system environment. This could do weird things with makepkg localization, however, which I just thought of. Maybe we shouldn't source things at all? Argh. See this comment for details on http://bugs.archlinux.org/task/9362#comment24537 |
This task depends upon
Closed by Allan McRae (Allan)
Wednesday, 30 July 2008, 05:44 GMT
Reason for closing: Fixed
Additional comments about closing: http://projects.archlinux.org/?p=pacman. git;a=commit;h=0e0a8461
Wednesday, 30 July 2008, 05:44 GMT
Reason for closing: Fixed
Additional comments about closing: http://projects.archlinux.org/?p=pacman. git;a=commit;h=0e0a8461
The locale.sh file in in profile.d , so sourcing the /etc/profile.d/* files, or sourcing /etc/profile
(which sources the /etc/profile.d/* files) should be equivalent, right?
So the weird things with makepkg localization should already be present now (well, maybe they are).
But LC_ALL is not set here. So I should be able to overwrite any locale with LC_ALL=foo makepkg.
Even if it sources things in /etc/profile, it should still work I think. (to be confirmed)
This can be worked around this way in makepkg:
CURRENT_LC_ALL=LC_ALL
source /etc/profile
LC_ALL=$CURRENT_LC_ALL
...
setting LANG changes all LC_* except LC_ALL,
and when LC_ALL is set before setting LANG - all other LC_* will be not changed by LANG.
Otherwise, I don't think this will cause a regression. Just to alleviate locale concerns, can you confirm that the output is correct when makepkg is run with and without "LC_ALL=C"?
As for the /dev/null redirection, I consider a profile script displaying something as a bug, but well..
I put the redirection back, just for the sake of keeping the old behavior.