Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 236641

Summary: emerge gentoo-sources fails with /var/tmp/portage/sys-kernel/gentoo-sources-2.6.25-r7/temp/environment: line 1: syntax error near unexpected token `)'
Product: Gentoo Linux Reporter: Cody Carey <cmfvulcanius>
Component: [OLD] Core systemAssignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel>
Status: RESOLVED NEEDINFO    
Severity: major CC: agaffney, dev-portage
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
build.log
last 50 lines of the environment file
first 10 lines of environment

Description Cody Carey 2008-09-04 02:25:02 UTC
Doing a fresh Gentoo install using the install-amd64-minimal-2008.0.iso. Followed the Gentoo manual tit for tat and everything goes perfect until I need to "emerge gentoo-sources."

(chroot) livecd / # emerge gentoo-sources
Calculating dependencies ... done!
>>> Verifying ebuild Manifests...

>>> Emerging (1 of 1) sys-kernel/gentoo-sources-2.6.25-r7 to /
 * linux-2.6.25.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                   [ ok ]
 * genpatches-2.6.25-8.base.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...       [ ok ]
 * genpatches-2.6.25-8.extras.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...     [ ok ]
 * checking ebuild checksums ;-) ...                                      [ ok ]
 * checking auxfile checksums ;-) ...                                     [ ok ]
 * checking miscfile checksums ;-) ...                                    [ ok ]
 * checking linux-2.6.25.tar.bz2 ;-) ...                                  [ ok ]
 * checking genpatches-2.6.25-8.base.tar.bz2 ;-) ...                      [ ok ]
 * checking genpatches-2.6.25-8.extras.tar.bz2 ;-) ...                    [ ok ]
>>> Preparing to unpack ...
/var/tmp/portage/sys-kernel/gentoo-sources-2.6.25-r7/temp/environment: line 1: syntax error near unexpected token `)'
/var/tmp/portage/sys-kernel/gentoo-sources-2.6.25-r7/temp/environment: line 1: `1Óµ     Þûu'ø]1å°Mj£ôW#øUúé▒ÊLÝåe[H,öé▒"|ö5ZÂ=$'\335\272q\326f\205\322u\031\037\344\251\335\003R\327\rN\327km^\330\200BH\334\221\324m\024M\204MlE\220\371\265\331\245}\341\003bZ\345\005B\310U\336\3575\031\306\341\225\3439\377\035\3251\E\2161\324\327\370\332#\360N\243\314\0061\231 \326\f\233}\371N\177u\020\367\005\317YQU\265qZ\006R\335P\021\242\020~\236\240)\236\a\232\306\3725\224FY\325\342\005b\353\245\032\027\262\336\353T\240\332\031\326\374E\334\2229]#\212\202k\035\340\3274TYi\237\v:b\fV\235\3231X\233e\312a9^\004\271\232\031\375\331\374Y\336\002\312_\225\311\026/\222\241\331Y\034\f\226\002\017\032\340j\365\235\005\035\243\036\342a\036\222\bW\361\027WuMC}P\001&b\E\232\234/\032\241\266\221\234\272\304\236\355E#\3600T\016\246\021\001\246Q\216\211\235\330\001 \346-X\241\310\242\321U\027\271\345\036<\272\332B\231\037\356\235c\330h\237\243I#\337\345c\216a\225\330\265\313.I\335\'\372\313\232}X\323\034$\304)S\004\301#=\272\242\272\255c\271\341\242D&d=2\377\230\206\020\343\330\305!Y\231@\245\330a\211pBK(\343\355''
 *
 * ERROR: sys-kernel/gentoo-sources-2.6.25-r7 failed.
 * Call stack:
 *               ebuild.sh, line 1641:  Called die
 * The specific snippet of code:
 *      preprocess_ebuild_env || \
 *              die "error processing environment"
 *  The die message:
 *   error processing environment
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sys-kernel/gentoo-sources-2.6.25-r7/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-kernel/gentoo-sources-2.6.25-r7/temp/environment'.
 *

 * Messages for package sys-kernel/gentoo-sources-2.6.25-r7:

 *
 * ERROR: sys-kernel/gentoo-sources-2.6.25-r7 failed.
 * Call stack:
 *               ebuild.sh, line 1641:  Called die
 * The specific snippet of code:
 *      preprocess_ebuild_env || \
 *              die "error processing environment"
 *  The die message:
 *   error processing environment
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/sys-kernel/gentoo-sources-2.6.25-r7/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-kernel/gentoo-sources-2.6.25-r7/temp/environment'.
 *
(chroot) livecd / #

Reproducible: Always

Steps to Reproduce:
1. Fresh AMD64 install
2. Follow the Gentoo manual
3. emerge gentoo-sources

Actual Results:  
Installation of the gentoo sources failed.

Expected Results:  
The gentoo sources should have installed.
Comment 1 Cody Carey 2008-09-04 02:25:57 UTC
Created attachment 164529 [details]
emerge --info

emerge --info
Comment 2 Cody Carey 2008-09-04 02:28:24 UTC
Created attachment 164531 [details]
build.log

build.log
Comment 3 Cody Carey 2008-09-04 02:28:55 UTC
Created attachment 164533 [details]
last 50 lines of the environment file

last 50 lines of the environment file
Comment 4 Cody Carey 2008-09-04 02:30:51 UTC
emerge --info

Portage 2.1.4.4 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.24-gentoo-r7 x86_64 Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
Timestamp of tree: Thu, 04 Sep 2008 01:34:01 +0000
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r13
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.mirrors.easynews.com/linux/gentoo/ "
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="a52 aac acl acpi aim alsa amd64 bash-completion berkdb bzip2 cdparanoia cdr cli cracklib crypt css cups cxx dbus dri dvd dvdr dvdread emacs encode fbcon ffmpeg firefox flac fortran ftp gdbm gif gpm hal iconv ieee1394 ipod ipv6 isdnlog java6 javascript jpeg jpeg2k midi mmx mp3 mpeg mplayer mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp oscar oss pam pcre pda pdf perl png pppd python quicktime readline reflection session sockets socks5 spl sse sse2 ssl startup-notification subversion svg sysfs syslog tcpd threads tiff truetype unicode usb vcd vorbis wmf xine xinerama xml xorg xscreensaver xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 5 Mike Pagano gentoo-dev 2008-09-04 15:08:57 UTC
'unset vga' in the short term and upgrade grub in the long term.

*** This bug has been marked as a duplicate of bug 222091 ***
Comment 6 Cody Carey 2008-09-04 17:16:04 UTC
Unsetting vga immediately after booting the install CD makes no difference. What makes you think this bug is related to bug 222091?
Comment 7 Cody Carey 2008-09-04 17:25:05 UTC
Created attachment 164591 [details]
first 10 lines of environment

Actually I'm guessing I probably would have run into the VGA problem found in the other bug. However the current problems is with parsing the first line of the environment file. I'm attaching the head output for environment. I should have done that before.
Comment 8 Mike Pagano gentoo-dev 2008-09-06 22:33:30 UTC
Can you try the patch from comment 72 of bug 222091
Comment 9 Cody Carey 2008-09-07 02:36:21 UTC
Patched filter-bash-environment.py but the result is still the exact same. Is there any more information I can provide you?
Comment 10 Fernando 2008-11-03 21:41:11 UTC
I have the same error here.
Anything I try to emerge results in this error.

My "uses" is empty, but I can not paste any information here because I'm using Windows XP64 right now. (Can you see the severity of this bug??)

May anyone tell me what file or program generates the file "environment"? May be I could help to find what is wrong if it is a shell script...
Comment 11 Fernando 2008-11-10 16:40:19 UTC
Well, if you are having this issue?

In change of trying to solve this issue, I just booted the 2007.0 minimal CD, did the exact same procedures (downloading latest versions of stage3 - 2008.0 - and portage) and got Gentoo installed.

Hope this helps.
Comment 12 Daniel Drake (RETIRED) gentoo-dev 2008-11-25 13:44:13 UTC
Maybe the portage developers can help here.

Do you have any idea where this environment file comes from and why it might be including the junk at the top of your copy?
Comment 13 Andrew Gaffney (RETIRED) gentoo-dev 2008-11-25 15:05:11 UTC
This looks an awful lot like the vga=<lots of junk> bug that stemmed from the 2008.0 release.

Cody, what version of grub do you have installed (in the MBR)? I believe it was 0.97-r5 that had a bug where it wouldn't terminate the string passed to the kernel for the kernel commandline, causing a bunch of junk to get appended to the final var. In this case, it looks like there happened to be a '=' in the junk, so the var name was junk as well.
Comment 14 Zac Medico gentoo-dev 2008-11-25 19:54:57 UTC
I'm not sure where that corrupt environment variable is coming from, but I think newer versions of portage will filter it out. Can you install sys-apps/portage-2.1.6_rc1 to see if it helps?

  echo =sys-apps/portage-2.1.6_rc1 >> /etc/portage/package.keywords
  emerge portage
Comment 15 Zac Medico gentoo-dev 2008-11-25 20:47:07 UTC
(In reply to comment #14)
Well, you also need eselect-news which doesn't have stable keywords either, so all together:

  mkdir -p /etc/portage
  echo =sys-apps/portage-2.1.6_rc1 >> /etc/portage/package.keywords
  echo =app-admin/eselect-news-20080320 >> /etc/portage/package.keywords
  emerge portage
Comment 16 Daniel Drake (RETIRED) gentoo-dev 2008-12-10 14:04:17 UTC
Zac, thanks for your input.

Cody, please reopen this bug when you have had a chance to test the portage upgrade suggested above.
Comment 17 Alex V. Koval 2008-12-17 16:13:51 UTC
yes, this is issue from stage3-i686-2008.0.tar.bz2 
the problem is in  'vga' environment variable.

to resolve this issue: do:
  su - root

then you can start using portage