Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 151374 - some ebuilds are clobbering /etc/profile.env
Summary: some ebuilds are clobbering /etc/profile.env
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-14 11:46 UTC by M. Edward Borasky
Modified: 2006-10-15 14:27 UTC (History)
0 users

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


Attachments
this is the clobbered profile.env (profile.env,2.16 KB, text/plain)
2006-10-14 12:17 UTC, M. Edward Borasky
Details
and this is what it looks like right after running "env-update" (profile.env,2.26 KB, text/plain)
2006-10-14 12:20 UTC, M. Edward Borasky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description M. Edward Borasky 2006-10-14 11:46:48 UTC
I am running an almost purely testing system (ACCEPT_KEYWORDS="~x86" with a few packages masked). Most of this is working fine, but occasionaly I find that an emerge fails because either it or a preceding one has clobbered "/etc/profile.env". Here's what it looks like after it has happened:

>>> Emerging (3 of 4) app-editors/gvim-7.0.91 to /
Traceback (most recent call last):
  File "/usr/bin/emerge", line 4262, in ?
    retval = emerge_main()
  File "/usr/bin/emerge", line 4257, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/bin/emerge", line 3774, in action_build
    retval = mergetask.merge(pkglist, favorites, mtimedb)
  File "/usr/bin/emerge", line 2193, in merge
    prev_mtimes=ldpath_mtimes)
  File "/usr/lib/portage/pym/portage.py", line 2853, in doebuild
    use_cache, mydbapi)
  File "/usr/lib/portage/pym/portage.py", line 2538, in doebuild_environment
    mysettings.reset(use_cache=use_cache)
  File "/usr/lib/portage/pym/portage.py", line 1444, in reset
    self.regenerate(use_cache=use_cache)
  File "/usr/lib/portage/pym/portage.py", line 1551, in regenerate
    env_d = getconfig(
  File "/usr/lib/portage/pym/portage_util.py", line 286, in getconfig
    raise portage_exception.ParseError(str(e)+" in "+mycfg)
portage_exception.ParseError: 'No closing quotation in /etc/profile.env'

At this point, the last few lines of /etc/profile.env are

export LESS='-R -M --shift 5'
export SGML_CATALOG_FILES='/etc/sgml/openjade-1.3.2.cat:/etc/sgml/sgml-docbook.c
at:/etc/sgml/dsssl-docbook-stylesheets.cat:/etc/sgml/sgml-docbook-4.1.cat:/etc/s
gml/sgml-docbook-4.0.cat:/etc/sgml/sgml-docbook-3.0.cat:/etc/sgml/sgml-docbook-3
.1.cat:/etc/sgml/sgml-lite.cat:/etc/sgml/xml-docbook-4.1.2.cat:/etc/sgml/xml-doc
book-4.4.cat:/etc/sgml/xml-docbook-4.2.cat'
export CFLAGS='-O3=''

I can edit the file and remove the extra quote at the end and continue, but some ebuilds don't even install because they hit this before they finish. Which ebuilds are doing this? So far, I know of xorg-server and media-libs/mesa. If I run into any others, I'll post them to this bug.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-10-14 11:53:49 UTC
Neither xorg-server not mesa clobbers anything here, and never has... Would be useful to attach the "clobbered" files here.
Comment 2 M. Edward Borasky 2006-10-14 12:15:35 UTC
A little more info -- I did a "watch" on /etc/profile.env while an emerge xorg-server was starting up. This is "when it happened"

 * checking MesaLib-6.5.1.tar.bz2 ;-) ...                                 [ ok ]
 * Forcing on xorg-x11 for new enough glxtokens.h...
Switching to xorg-x11 OpenGL interface.../usr/portage/x11-base/xorg-server/xorg-server-1.1.1-r1.ebuild: line 273: 28477 Killed                  eselect opengl set --impl-headers ${OPENGL_DIR}
>>> Unpacking source...


There was something very much like this in the emerge of media-libs/mesa, so I'd say something in the mesa area is confused.

Comment 3 M. Edward Borasky 2006-10-14 12:17:01 UTC
Created attachment 99670 [details]
this is the clobbered profile.env
Comment 4 M. Edward Borasky 2006-10-14 12:20:03 UTC
Created attachment 99673 [details]
and this is what it looks like right after running "env-update"
Comment 5 Nick Pollitt 2006-10-15 12:33:23 UTC
My profile.env gets clobbered emerging x11-base/xorg-server-1.0.2-r7.  The offending line is at the end:
export eP
Comment 6 Nick Pollitt 2006-10-15 12:33:23 UTC
My profile.env gets clobbered emerging x11-base/xorg-server-1.0.2-r7.  The offending line is at the end:
export eP×Ä÷':8ùÛ{~?=''

The final messages from the emerge:
<snip>
   usr/bin/Xdmx

QA Notice: the following files are setXid, dyn linked, and using lazy bindings
 This combination is generally discouraged.  Try re-emerging the package:
 LDFLAGS='-Wl,-z,now' emerge xorg-server
LAZY usr/bin/Xorg

>>> Merging x11-base/xorg-server-1.0.2-r7 to /
!!! Invalid token (not "=")

Traceback (most recent call last):
  File "/usr/bin/emerge", line 4049, in ?
    emerge_main()
  File "/usr/bin/emerge", line 4044, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/bin/emerge", line 3584, in action_build
    mergetask.merge(pkglist, favorites, mtimedb)
  File "/usr/bin/emerge", line 2048, in merge
    prev_mtimes=ldpath_mtimes)
  File "/usr/lib/portage/pym/portage.py", line 3023, in doebuild
    vartree=vartree, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage.py", line 3242, in merge
    mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage.py", line 6415, in merge
    cleanup=cleanup, mydbapi=mydbapi, prev_mtimes=prev_mtimes)
  File "/usr/lib/portage/pym/portage.py", line 5980, in treewalk
    vartree=self.vartree)
  File "/usr/lib/portage/pym/portage.py", line 2770, in doebuild
    use_cache, mydbapi)
  File "/usr/lib/portage/pym/portage.py", line 2477, in doebuild_environment
    mysettings.reset(use_cache=use_cache)
  File "/usr/lib/portage/pym/portage.py", line 1365, in reset
    self.regenerate(use_cache=use_cache)
  File "/usr/lib/portage/pym/portage.py", line 1470, in regenerate
    env_d = getconfig(
  File "/usr/lib/portage/pym/portage_util.py", line 283, in getconfig
    raise portage_exception.ParseError(str(e)+" in "+mycfg)
portage_exception.ParseError: "ParseError: Invalid token (not '='): /etc/profile.env: line 35 in /etc/profile.env"
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2006-10-15 12:37:43 UTC
(In reply to comment #5)
> My profile.env gets clobbered emerging x11-base/xorg-server-1.0.2-r7.  The
> offending line is at the end:
> export eP
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2006-10-15 12:37:43 UTC
(In reply to comment #5)
> My profile.env gets clobbered emerging x11-base/xorg-server-1.0.2-r7.  The
> offending line is at the end:
> export eP×Ä÷':8ùÛ{~?=''

Folks, you should probably check your hardware. Plus, profile.env is *generated*, need the file inside /etc/env.d that contains the broken lines and the name of ebuild that installed the file. If there's none such file, see above.
Comment 9 Nick Pollitt 2006-10-15 14:17:43 UTC
The problem for me was coming from the eselect call also.  It turns out that the /etc/env.d/klive-<id> file was injecting some binary string into profile.env.  I removed the klive file and emerge worked.
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2006-10-15 14:27:45 UTC
(In reply to comment #7)
> It turns out that the /etc/env.d/klive-<id> file was injecting some binary 
> string into profile.env.  I removed the klive file and emerge worked.

Uh... app-misc/klive doesn't install anything into /etc/env.d *confused*