Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130229 - /etc/profile.env overwrites variables given on command-line
Summary: /etc/profile.env overwrites variables given on command-line
Status: RESOLVED DUPLICATE of bug 51370
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 130587 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-17 02:20 UTC by Xake
Modified: 2006-05-02 02:35 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xake 2006-04-17 02:20:35 UTC
The short version of the errormessage:
firefox-sv-SE-1.5.0.2.xpi never got downloaded, so when the file is supposed to be unpacked it fails.

##
#errormessage
##

>>> checksums files   ;-) files/icon/firefox-icon.png
>>> checksums src_uri ;-) firefox-1.5.0.2-source.tar.bz2
>>> checksums src_uri ;-) mozilla-firefox-1.5.0.2-patches-1.0.tar.bz2
>>> Unpacking source...
>>> Unpacking firefox-1.5.0.2-source.tar.bz2 to /var/tmp/portage/mozilla-firefox-1.5.0.2/work
>>> Unpacking mozilla-firefox-1.5.0.2-patches-1.0.tar.bz2 to /var/tmp/portage/mozilla-firefox-1.5.0.2/work
 * Unpacking firefox-sv-SE-1.5.0.2.xpi to /var/tmp/portage/mozilla-firefox-1.5.0.2/work

!!! ERROR: www-client/mozilla-firefox-1.5.0.2 failed.
Call stack:
  ebuild.sh, line 1532:   Called dyn_unpack
  ebuild.sh, line 697:   Called src_unpack
  mozilla-firefox-1.5.0.2.ebuild, line 77:   Called xpi_unpack 'firefox-sv-SE-1.5.0.2.xpi'
  mozextension.eclass, line 26:   Called die

!!! firefox-sv-SE-1.5.0.2.xpi does not exist
!!! If you need support, post the topmost build error, and the call stack if relevant.

##
#emerge --info
##

Portage 2.1_pre7-r5 (default-linux/x86/2006.0, gcc-3.4.4, glibc-2.4-r2, 2.6.16-gentoo-r1 i686)
=================================================================
System uname: 2.6.16-gentoo-r1 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System version 1.12.0_pre17
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.91.0.6
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.16
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -pipe -O2 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-march=pentium4 -pipe -O2 -fomit-frame-pointer -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS=""
FEATURES="autoconfig ccache confcache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.csbnet.se/pub/linux/distributions/gentoo/ http://trumpetti.atm.tut.fi/gentoo/ http://pandemonium.tiscali.de/pub/gentoo/ http://mirror.pudas.net/gentoo"
LANG="sv_SE.UTF-8"
LC_ALL="sv_SE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,-Bdirect"
LINGUAS="sv_SE.UTF-8"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/gnome /usr/local/overlays/xgl /usr/local/overlays/portage /usr/local/overlays/gentopia /usr/local/overlays/musicbrainz-overlay"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X a52 aac acpi alsa asf audioscrobbler avi bash bash-completion beagle berkdb bitmap-fonts branding browserplugin bzip2 cairo canvas cdr cli crypt ctype cups curl dba dbus debug dmx dri dvd dvdr eds emboss encode evo expat fastbuild fat firefox flac force-cgi-redirect fortran freetype ftp gd gdbm gif glibc-omitfp glitz gmp gnome gnome-firefox gnutls gpm gstreamer gstreamer010 gstreamer10 gtk gtk2 gtkhtml gxl hal howl-compat icu idn imlib inotify ipv6 irmc isdnlog java jikes joystick jpeg lcms libclamav libg++ libnotify libsexy libwww lm_sensors logrotate lx700 mad matroska memlimit mikmod mmx mng mono moznocompose moznoirc moznomail mp3 mpeg musepack musicbrainz nautilus ncurses network nls nptl nptlonly ntfs ntp nvidia offensive ogg opengl pam pcre pdflib perl pic png posix ppds pppd python quicktime readline real reiser4 reiserfs rtc samba sdl session simplexml smp soap sockets sox spell spf spl sse sse2 ssl startup-notification svg symlink tagwriting tcltk tcpd test tetex theora threads tiff tokenizer truetype truetype-fonts type1-fonts udev unicode usb userlocales utf8 vorbis win32codecs wma wv wxwindows xinetd xml xml2 xosd xprint xsl xv xvid zlib elibc_glibc input_devices_keyboard input_devices_evdev input_devices_mouse kernel_linux linguas_sv_SE.UTF-8 userland_GNU video_cards_none video_cards_nvidia"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK
Comment 1 Xake 2006-04-17 02:21:46 UTC
Oh, and it worked with versions 1.5.0.1*
Comment 2 Harald van Dijk (RETIRED) gentoo-dev 2006-04-17 03:32:33 UTC
sv_SE.UTF-8 isn't a valid LINGUAS setting and is supposed to be ignored completely, and is for me. Do you perhaps have some bashrc stuff that changes LINGUAS too late for portage to see it?
Comment 3 Xake 2006-04-17 05:43:46 UTC
Apparently SOMETHING changes it.
The only value I have set is in /etc/env.d where it is set to LANG="sv" and this is honored in console, but as soon as my gdm/gnome starts this settings is changed to sv_SE.UTF-8 and I have no clue where and why this is done.
Comment 4 Harald van Dijk (RETIRED) gentoo-dev 2006-04-17 05:58:03 UTC
LANG and LINGUAS are related but not the same. The value for LANG is not incorrect, but even if it were wouldn't be a problem. Could you please check if LINGUAS gets changed?
Comment 5 Xake 2006-04-17 09:23:16 UTC
Both LANG and LINGUAS is changed if i export in a gnome-terminal, but I do not know where and when, must be somewhere within my grafical env as if I do Ctrl+Alt+F1, login and 'export' shows the correct values (which for both is in env.d assigned "sv".
Comment 6 Harald van Dijk (RETIRED) gentoo-dev 2006-04-17 11:06:39 UTC
It's not so much that your LINGUAS is changed *to* sv_SE.UTF-8 that causes the build failure, it's that it gets changed *back from* sv_SE.UTF-8 at the wrong time. If it weren't changed back, you'd have a fully functional mozilla-firefox. (It would be in English, so you still have to figure out yourself why it got changed in the first place, but aborting isn't good.) You said you set your LANG in /etc/env.d/, do you set your LINGUAS there too? If so, there is the problem; portage sources /etc/profile.env (generated from /etc/env.d/) after it expands USE variables. A simple test case:

test-1.0.ebuild:
KEYWORDS="~x86"
pkg_setup() {
    echo ${LINGUAS}
    echo ${USE}
    die
}

/etc/env.d/99linguas:
LINGUAS='en en_GB'

Run `LINGUAS='nl' emerge test/test` and you'll see USE's linguas_* don't match with LINGUAS anymore. So it would be nice if portage would make USE_EXPANDed variables read-only before sourcing profile.env; this would ensure they're kept in sync.
Comment 7 Harald van Dijk (RETIRED) gentoo-dev 2006-04-17 11:13:30 UTC
Actually, making them read-only would be a bad idea, that would break things like strip-linguas, but what would be possible is to not read them in the first place (for example, by not sourcing /etc/profile.env, but if it must be read at all, only eval'ing the lines which don't set USE-changing variables).
Comment 8 Xake 2006-04-17 12:21:27 UTC
I have everything set up in 02locale, LC_ALL LINGUAS LANG.... LC_ALL="sv_SE.UTF-8", the rest just sv.

So whats happening short said is that my DE seems to set up LINGUAS="sv_SE.UTF-8" and emerge uses it until it is time for unpack when it sources env.d (where only the above mentioned is) directly and thats the reason I can't emerge?
Comment 9 Harald van Dijk (RETIRED) gentoo-dev 2006-04-20 04:51:39 UTC
*** Bug 130587 has been marked as a duplicate of this bug. ***
Comment 10 Simon Stelling (RETIRED) gentoo-dev 2006-05-01 15:41:42 UTC
actually, the problem isn't specific to USE_EXPAND at all, so rather than setting USE_EXPAND readonly, we just dump the env before the sourcing and go back to that right afterwards.

fixed in rev 3300
Comment 11 Harald van Dijk (RETIRED) gentoo-dev 2006-05-01 22:53:52 UTC
Maybe I'm misunderstanding, but I thought the point of sourcing profile.env was to ensure that important variables would be set to something sane, which would mean for most variables, whatever's in the current environment needs to be ignored. I may well be wrong though :) If it's intended to let the user override everything, wouldn't it be better to not source profile.env at all, since unset variables mean a) the user did so explicitly, meaning it's probably meant to remain unset, or b) the user hasn't logged in or re-sourced /etc/profile since the last update, which causes problems with the current approach too?
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2006-05-02 01:51:32 UTC
*** Bug 123563 has been marked as a duplicate of this bug. ***
Comment 13 Simon Stelling (RETIRED) gentoo-dev 2006-05-02 02:35:01 UTC
right, brian harring pointed out that there are various issues with the env dumping and the solution is not so easy, so i reverted rev 3300 until i can come up with something that actually works in all cases.

besides, this is bug 51370 :)

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

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