First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 128420
Alias:
Product:
Component:
Status: RESOLVED
Resolution: DUPLICATE of bug 51370
Assigned To: Portage team <dev-portage@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Timothy Stotts <devel@tstotts.net>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
modified-emerge-info.txt Emerge info output with sensitive information removed. text/plain Timothy Stotts 2006-04-01 11:05 0000 3.57 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 128420 depends on: Show dependency tree
Bug 128420 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-04-01 11:05 0000
Expected:
    The following should propagate the LC_ALL value to the build environment.
# LC_ALL="anything" emerge "anything"

Actual:
    The LC_ALL from /etc/profile is always used by emerge, regardless of user
environment.

Steps to demonstrate:
    (1) echo 'LC_ALL="en_US.utf-8"' > /etc/env.d/02locale
    (2) env-update && source /etc/profile
    (3) copy any ebuild from /usr/portage to /usr/local/portage
    (4) add the following line immediately past "src_unpack()"
        locale; export | grep LC_ALL; die "just testing env propagation"
    (5) LC_ALL="C" emerge "your_moified_ebuild"

    You will that that the variable LC_ALL="C" did NOT propagate.
    This is irrespective of FEATURES value.

    (6) unset LC_ALL; emerge info
        This command will show LC_ALL as unset, but then builds with LC_ALL
from /etc/profile!

Workaround:
    modify /etc/portage/bashrc

    BUT emerge _should_ propagate LC_ALL just like any other variable!

Notes:
    # epm -qG portage
    sys-apps/portage-2.0.54

    Root and portage users have no LC_ALL in their bashrc or bash_profile
files.

------- Comment #1 From Timothy Stotts 2006-04-01 11:05:25 0000 -------
Created an attachment (id=83643) [details]
Emerge info output with sensitive information removed.

------- Comment #2 From Timothy Stotts 2006-04-01 11:29:43 0000 -------
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

------- Comment #3 From SpanKY 2006-04-01 12:55:32 0000 -------
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"
...

------- Comment #4 From Timothy Stotts 2006-04-01 13:29:12 0000 -------
(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.

------- Comment #5 From Timothy Stotts 2006-04-01 13:40:47 0000 -------
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

------- Comment #6 From SpanKY 2006-04-01 13:53:59 0000 -------
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

------- Comment #7 From Zac Medico 2006-04-06 11:22:45 0000 -------
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.

------- Comment #8 From Timothy Stotts 2006-04-06 14:03:24 0000 -------
(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 .

------- Comment #9 From Alec Warner 2006-05-25 21:01:36 0000 -------

*** This bug has been marked as a duplicate of 51370 ***

First Last Prev Next    No search results available      Search page      Enter new bug