Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 152318 - eselect env update breaks profile.env when value contains "="
Summary: eselect env update breaks profile.env when value contains "="
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: eselect (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo eselect Team
URL:
Whiteboard:
Keywords:
: 152168 152277 152553 153431 156007 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-10-22 00:01 UTC by Jason Stubbs (RETIRED)
Modified: 2007-01-06 18:53 UTC (History)
8 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 Jason Stubbs (RETIRED) gentoo-dev 2006-10-22 00:01:26 UTC
...
>>> Emerging (42 of 297) sys-apps/baselayout-1.12.5-r2 to /
...
>>> Emerging (43 of 297) app-admin/eselect-1.0.6 to /
...
>>> Emerging (44 of 297) app-admin/eselect-opengl-1.0.5 to /
...
>>> Emerging (45 of 297) x11-base/xorg-server-1.1.1-r1 to /
...
Traceback (most recent call last):
  File "/usr/lib/portage/bin/portageq", line 343, in ?
    main()
  File "/usr/lib/portage/bin/portageq", line 335, in main
    import portage
  File "/usr/lib/portage/pym/portage.py", line 7291, in ?
    init_legacy_globals()
  File "/usr/lib/portage/pym/portage.py", line 7247, in init_legacy_globals
    db = create_trees(**kwargs)
  File "/usr/lib/portage/pym/portage.py", line 7203, in create_trees
    config_incrementals=portage_const.INCREMENTALS)
  File "/usr/lib/portage/pym/portage.py", line 1162, in __init__
    env_d = getconfig(
  File "/usr/lib/portage/pym/portage_util.py", line 293, in getconfig
    raise portage_exception.ParseError(str(e)+" in "+mycfg)
portage_exception.ParseError: 'No closing quotation in /etc/profile.env'

!!! ERROR: x11-base/xorg-server-1.1.1-r1 failed.
Call stack:
  ebuild.sh, line 1584:   Called dyn_setup
  ebuild.sh, line 665:   Called pkg_setup
  xorg-server-1.1.1-r1.ebuild, line 332:   Called built_with_use 'media-libs/mesa' 'nptl'
  eutils.eclass, line 1599:   Called die

!!! Unable to resolve media-libs/mesa to an installed package
!!! If you need support, post the topmost build error, and the call stack if relevant.

# tail -n 1 /etc/profile.env
export XMODIFIERS="@im=''
# grep XMODIFIERS /etc/env.d/*
/etc/env.d/02i18n:XMODIFIERS="@im=SCIM"



Fixing /etc/profile.env and then rerunning env-update didn't reproduce it.
As the above package list shows, nothing running up to the error indicates a
problem either... 

Portage 2.1.2_pre3-r6 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.4-r3, 2.6.16-ck12 i686)
=================================================================
System uname: 2.6.16-ck12 i686 AMD Opteron(tm) Processor 246
Gentoo Base System version 1.12.5
Last Sync: Sat, 21 Oct 2006 04:30:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.0-r2, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=opteron -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/NX/etc /usr/NX/home /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -march=opteron -pipe"
DISTDIR="/home/portage/distfiles"
FEATURES="autoconfig distlocks parallel-fetch sandbox sfperms splitdebug strict"
GENTOO_MIRRORS="http://gentoo.gg3.net/"
LC_ALL="ja_JP.UTF-8"
LINGUAS="en_US ja"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/home/portage/rsync"
PORTDIR_OVERLAY="/home/portage/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 alsa elibc_glibc immqt-bc input_devices_keyboard input_devices_linuxinput input_devices_mouse kdeenablefinal kdehiddenvisibility kernel_linux linguas_en_US linguas_ja mmx nptl opengl qt3 sse unicode userland_GNU video_cards_none video_cards_nvidia xcomposite xorg"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jason Stubbs (RETIRED) gentoo-dev 2006-10-22 00:07:38 UTC
*** Bug 152277 has been marked as a duplicate of this bug. ***
Comment 2 Jason Stubbs (RETIRED) gentoo-dev 2006-10-22 00:36:11 UTC
And the second time around:

# head -n 2 /etc/profile.env
# Configuration file for eselect
# This file has been automatically generated.


So whom does this go to now? :)
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-10-22 00:56:56 UTC
(In reply to comment #2)
> So whom does this go to now? :)

Shrug...

# grep eselect /usr/portage/x11-base/xorg-server/xorg-server-1.1.1-r1.ebuild 

<snip>
	OLD_IMPLEM="$(eselect opengl show)"
	eselect opengl set --impl-headers ${OPENGL_DIR}
		eselect opengl set ${OLD_IMPLEM}
<snip>

If either of those produces junk, you'll get junk in profile.env?
Comment 4 Jason Stubbs (RETIRED) gentoo-dev 2006-10-22 02:12:45 UTC
This fixes it for my case.

--- env.eselect.orig    2006-10-23 18:14:51.000000000 +0000
+++ env.eselect 2006-10-23 18:14:57.000000000 +0000
@@ -51,7 +51,7 @@
                # Which vars are to be loaded?
                # TODO: Change to bash magic?
                vars=$(sed \
-                       -e '/^#/d' -e '/^\s*$/d' -e '/^.*=/s/^\(.*\)=.*/\1/' \
+                       -e '/^#/d' -e '/^\s*$/d' -e '/^.*=/s/^\([^=]*\)=.*/\1/' \
                        ${envfile})
                [[ -z ${vars} ]] && continue
                for var in ${vars} ; do
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2006-10-23 07:48:06 UTC
*** Bug 152553 has been marked as a duplicate of this bug. ***
Comment 6 Zac Medico gentoo-dev 2006-10-23 12:09:57 UTC
*** Bug 152168 has been marked as a duplicate of this bug. ***
Comment 7 Danny van Dyk (RETIRED) gentoo-dev 2006-10-24 11:57:30 UTC
(In reply to comment #4)
> This fixes it for my case.
> 
> --- env.eselect.orig    2006-10-23 18:14:51.000000000 +0000
> +++ env.eselect 2006-10-23 18:14:57.000000000 +0000
> @@ -51,7 +51,7 @@
>                 # Which vars are to be loaded?
>                 # TODO: Change to bash magic?
>                 vars=$(sed \
> -                       -e '/^#/d' -e '/^\s*$/d' -e '/^.*=/s/^\(.*\)=.*/\1/' \
> +                       -e '/^#/d' -e '/^\s*$/d' -e '/^.*=/s/^\([^=]*\)=.*/\1/'
> \
>                         ${envfile})
>                 [[ -z ${vars} ]] && continue
>                 for var in ${vars} ; do
> 
Jason: Thanks for debuging and reporting. Muchly appreciated!
In SVN as of r332. I will release a bug-fix version for this and the
bsd-die bug $SOONish.
Comment 8 Danny van Dyk (RETIRED) gentoo-dev 2006-10-30 16:15:30 UTC
*** Bug 153431 has been marked as a duplicate of this bug. ***
Comment 9 Danny van Dyk (RETIRED) gentoo-dev 2006-11-08 16:00:43 UTC
Fixed as of eselect-1.0.7.
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2006-11-23 01:46:17 UTC
*** Bug 156007 has been marked as a duplicate of this bug. ***
Comment 11 Mike Kelly (RETIRED) gentoo-dev 2007-01-06 18:53:02 UTC
1.0.7 is in the tree. Resolving this.