Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 262647 - dev-texlive/texlive-latexextra-2008-r1 Download of disfiles fails with wget error "Argument list too long"
Summary: dev-texlive/texlive-latexextra-2008-r1 Download of disfiles fails with wget e...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 210077 268228
  Show dependency tree
 
Reported: 2009-03-16 11:12 UTC by Ross Drummond
Modified: 2020-04-29 17:02 UTC (History)
1 user (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 Ross Drummond 2009-03-16 11:12:51 UTC
Downloading 'ftp://mirror.pacific.net.au/linux/Gentoo/distfiles/texlive-module-warning-2008.tar.lzma'
[Errno 7] Argument list too long:
/usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/texlive-module-warning-2008.tar.lzma ftp://mirror.pacific.net.au/linux/Gentoo/distfiles/texlive-module-warning-2008.tar.lzma


Reproducible: Always




When I manually use wget to download files to distfiles directory the download succeeds.
Comment 1 Lars Wendler (Polynomial-C) gentoo-dev 2009-03-17 19:05:20 UTC
Please post your "emerge --info" and paste the exact output of the package when failing during emerge.
Comment 2 Lars Wendler (Polynomial-C) gentoo-dev 2009-03-18 05:59:04 UTC
Reopen this bug when you provide the requested information.
Comment 3 Ross Drummond 2009-03-18 10:01:52 UTC
emerge --info output;

Portage 2.1.6.7 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.20-gentoo-r8 x86_64)
=================================================================
System uname: Linux-2.6.20-gentoo-r8-x86_64-AMD_Athlon-tm-_64_Processor_3200+-with-glibc2.2.5
Timestamp of tree: Wed, 18 Mar 2009 06:15:01 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.4.4-r13, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirror.pacific.net.au/linux/Gentoo"
LDFLAGS="-Wl,-O1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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.au.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg kde ldap libnotify mad midi mikmod mmx mp3 mpeg mudflap multilib ncurses nls nptl nptlonly nvidia ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis xml xorg xulrunner xv zlib" ALSA_CARDS="intel8x0" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


-------------------------------------------------------------------------------
Output of;

/var/tmp/portage/dev-texlive/texlive-latexextra-2008-r1/temp/build.log

available from;

http://users.snap.net.nz/~rossd/texlive-latexextra-2008_buildlog.txt

Note that some source files have been downloded to the distfiles directory manually.


Comment 4 Ross Drummond 2009-03-19 09:40:06 UTC
This bug has resolved itself.

I am not aware of any changes made which would have affected the bug, but I am prepared to accept this as a win and move on.

I have changed the bug status to WORKSFORME.
Comment 5 Dallas 2009-04-02 22:15:55 UTC
I have this issue.  One thing to consider is that I build in an i686 chroot environment.  But no other ebuild has any problem with that (I've been doing it for years...).

Portage 2.1.6.11 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.18-92.1.22.el5.centos.plus i686)
=================================================================
System uname: Linux-2.6.18-92.1.22.el5.centos.plus-i686-Intel-R-_Xeon-R-_CPU_X5365_@_3.00GHz-with-glibc2.0
Timestamp of tree: Thu, 02 Apr 2009 19:45:02 +0000
distcc[1975] (dcc_get_top_dir) Warning: HOME is not set; can't find distcc directory [disabled]
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.4.4-r13, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r8
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.3
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
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.2
sys-devel/binutils:  2.18-r4, 2.19, 2.19.1-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_US us"
MAKEOPTS="-j7"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage/local/layman/science /usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="3dfx 3dnow X Xaw3d a52 aac aalib acl acpi adabas adns aim alsa ao apache2 apm arts atm audiofile avahi bash-completion bcmath berkdb bidi bindist birdstep blas bluetooth boundschecking branding bzip2 cairo calendar canna caps cdb cddb cdinstall cdparanoia cdr cgi chasen cjk clamav cli cracklib crypt cscope css ctype cups curl curlwrappers cvs cxx db2 dbase dbm dbmaker dbus dbx dga directfb djvu doc dri dts dv dvb dvd dvdr dvdread eds emacs emboss empress empress-bcs encode enscript esd esoob evo examples exif expat fam fastcgi fbcon ffmpeg fftw filepro firebird firefox flac flatfile fltk fontconfig foomaticdb fortran freetds freewnn frontbase ftp gcj gd gd-external gdbm geoip ggi gif gimp ginac glut gmp gnome gnome-keyring gnuplot gnustep gnutls gphoto2 gpm gps graphviz gsl gstreamer gtk gtkhtml guile hal hddtemp hdf5 htmlhandbook hyperwave-api iconv icq idn ieee1394 imagemagick imap imlib informix inifile innodb interbase iodbc ipod ipv6 isdnlog jabber jack java java5 java6 javascript jbig jingle jpeg jpeg2k kde kdeenablefinal kolab ladcca ladspa lame lapack lash latex lcms ldap libcaca libedit libgda libnotify libsamplerate libwww lirc lm_sensors lua lzo m17n-lib mad maildir mailwrapper matroska matrox mbox mcal mcve memlimit mhash midi migemo mikmod milter mime mmap mmx mng mnogosearch modplug mono motif mozilla mp3 mpeg mpi mplayer msn msql mssql mudflap mule musepack musicbrainz mysql mysqli nas ncurses neXt netboot netcdf networkmanager nis nls nntp nptl nptlonly nsplugin ocaml ocamlopt oci8 oci8-instant-client odbc ofx ogg old-linux openal openexr opengl openmp oracle oracle7 osc oscar pam pcmcia pcntl pcre pda pdf perl pfpro php pic plotutils png portaudio posix postgres ppds pppd prelude profile pulseaudio python qdbm qmail-spp qt3 qt4 quicktime radius raw rdesktop readline recode reflection rss ruby samba sapdb sasl scanner sdl seamonkey session sharedext sharedmem shorten simplexml skey slang slp smartcard sndfile snmp soap sockets socks5 solid sox speex spell spl sqlite sqlite3 sse sse2 ssl startup-notification subversion svg svga sybase sybase-ct symlink sysfs syslog sysvipc szip taglib tcl tcpd test tetex theora threads tidy tiff timidity tk tokenizer truetype unicode usb v4l v4l2 vcd vhosts videos vim-syntax vnc voodoo3 vorbis wavpack wddx wifi win32codecs wmf wxwindows x264 x86 xattr xcomposite xemacs xface xine xinerama xinetd xml xmlrpc xorg xosd xpm xprint xscreensaver xsl xulrunner xv xvid yahoo yaz zeroconf zlib" ALSA_CARDS="hda-intel intel8x0 intel8x0m via82xx" 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 auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so 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" LINGUAS="en en_US us" USERLAND="GNU" VIDEO_CARDS="fbdev intel i810 radeon vesa ati mach64 atimisc"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 6 Dallas 2009-04-02 22:20:36 UTC
build.log:

[Errno 7] Argument list too long:
   /bin/bash -c touch "/usr/portage/distfiles/.__portage_test_write__" 2>/dev/null ; rval=$? ; rm -f  "/usr/portage/distfiles/.__portage_test_write__" ; exit $rval
[Errno 7] Argument list too long:
   /bin/bash -c touch "/usr/portage/distfiles/.locks/.__portage_test_write__" 2>/dev/null ; rval=$? ; rm -f  "/usr/portage/distfiles/.locks/.__portage_test_write__" ; exit $rval
 * texlive-module-achemso-2008.tar.lzma RMD160 SHA1 SHA256 size ;-) ...  [ ok ]
 * texlive-module-hypdvips-2008.tar.lzma RMD160 SHA1 SHA256 size ;-) ... [ ok ]
 * texlive-module-papertex-2008.tar.lzma RMD160 SHA1 SHA256 size ;-) ... [ ok ]
 * texlive-module-doi-2008.tar.lzma RMD160 SHA1 SHA256 size ;-) ...      [ ok ]
 * texlive-module-bizcard-2008.tar.lzma RMD160 SHA1 SHA256 size ;-) ...  [ ok ]
 * texlive-module-sdrt-2008.tar.lzma RMD160 SHA1 SHA256 size ;-) ...     [ ok ]
 * texlive-module-coordsys-2008.tar.lzma RMD160 SHA1 SHA256 size ;-) ... [ ok ]
 * texlive-module-tracking-2008.tar.lzma RMD160 SHA1 SHA256 size ;-) ... [ ok ]
 * texlive-module-captcont-2008.tar.lzma RMD160 SHA1 SHA256 size ;-) ... [ ok ]
 * texlive-module-warning-2008.tar.lzma RMD160 SHA1 SHA256 size ;-) ...  [ ok ]
>>> Downloading 'http://distfiles.gentoo.org/distfiles/texlive-module-boites-2008.tar.lzma'
[Errno 7] Argument list too long:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/texlive-module-boites-2008.tar.lzma http://distfiles.gentoo.org/distfiles/texlive-module-boites-2008.tar.lzma
>>> Downloading 'http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/texlive-module-boites-2008.tar.lzma'
...
Comment 7 Ross Drummond 2009-04-02 22:59:31 UTC
I did another install of this ebuild on another computer and struck the problem again.

After manually downloading a number of modules to the distfiles directory I found the following command cleared the error;

emerge -f texlive-latexextra

The -f option is the download only argument. After this command succeeded I ran the same command without the option and the emerge ran successfully.

Can dallas.masters run this command and report whether this clears the bug
Comment 8 Dallas 2009-04-02 23:06:45 UTC
(In reply to comment #7)

Yes. That worked.  Seeing the number of downloads, it seems like somewhere this arg list is too long?
Comment 9 Zac Medico gentoo-dev 2009-04-04 19:07:38 UTC
It seems that os.execve() is raising the '[Errno 7] Argument list too long' exception when portage tries to call the fetcher. For some reason it doesn't affect --fetchonly mode, apparently related to the fact that ebuild(1) is not used for fetching in --fetchonly mode.
Comment 10 Zac Medico gentoo-dev 2009-04-05 03:31:30 UTC
Apparently this is something like bug #222091, in which and extremely long environment variable (SRC_URI in this case) triggers 'Argument list too long' errors. I'm not sure why this would affect some users and not others. I don't get that error here.
Comment 11 Zac Medico gentoo-dev 2009-04-05 05:16:28 UTC
This page has some info about ARG_MAX with various kernels:

 http://www.in-ulm.de/~mascheck/various/argmax/

Since linux-2.6.23, ARG_MAX is practically unlimited on the kernel side:

 http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b6a2fea39318e43fee84fa7b0b90d68bed92d2ba

I'm running linux-2.6.29 here with glibc-2.9_p20081201-r2 and `getconf ARG_MAX` reports 2097152 bytes.

For compatibility with more kernels, I'll have to patch the fetch code so that it doesn't pass potentially large environment variables into execve() calls.
Comment 12 Zac Medico gentoo-dev 2009-04-05 05:59:20 UTC
This is fixed in svn r13290.
Comment 13 Zac Medico gentoo-dev 2009-04-11 04:26:20 UTC
This is fixed in 2.2_rc29.
Comment 14 Zac Medico gentoo-dev 2009-05-02 02:35:22 UTC
This is fixed in 2.1.6.12.
Comment 15 Étienne Buira 2009-11-15 20:26:21 UTC
(In reply to comment #14)
> This is fixed in 2.1.6.12.
> 

Strikes back on 2.1.7.4, even if fetching only:
# emerge -f texlive-latexextra
Calculating dependencies... done!

>>> Fetching (1 of 1) dev-texlive/texlive-latexextra-2008-r1
[Errno 7] Argument list too long:
   /bin/bash -c touch "/usr/portage/distfiles/.__portage_test_write__" 2>/dev/null ; rval=$? ; rm -f  "/usr/portage/distfiles/.__portage_test_write__" ; exit $rval
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/process.py", line 249, in spawn
    env, gid, groups, uid, umask, pre_exec)
  File "/usr/lib64/portage/pym/portage/process.py", line 378, in _exec
    os.execve(binary, myargs, env)
  File "/usr/lib64/portage/pym/portage/__init__.py", line 194, in __call__
    rval = self._func(*wrapped_args, **wrapped_kwargs)
OSError: [Errno 7] Argument list too long
[Errno 7] Argument list too long:
   /bin/bash -c touch "/usr/portage/distfiles/.locks/.__portage_test_write__" 2>/dev/null ; rval=$? ; rm -f  "/usr/portage/distfiles/.locks/.__portage_test_write__" ; exit $rval
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/process.py", line 249, in spawn
    env, gid, groups, uid, umask, pre_exec)
  File "/usr/lib64/portage/pym/portage/process.py", line 378, in _exec
    os.execve(binary, myargs, env)
  File "/usr/lib64/portage/pym/portage/__init__.py", line 194, in __call__
    rval = self._func(*wrapped_args, **wrapped_kwargs)
OSError: [Errno 7] Argument list too long
 * texlive-module-achemso-2008.tar.lzma RMD160 SHA1 SHA256 size ;-) ... [ ok ]
 * texlive-module-mcaption.source-2008.tar.lzma RMD160 SHA1 SHA256 size ;-) ... [ ok ]
 * texlive-module-newfile.source-2008.tar.lzma RMD160 SHA1 SHA256 size ;-) ... [ ok ]
 * texlive-module-coordsys-2008.tar.lzma RMD160 SHA1 SHA256 size ;-) ... [ ok ]
 * texlive-module-flippdf.source-2008.tar.lzma RMD160 SHA1 SHA256 size ;-) ... [ ok ]
 * texlive-module-lkproof.doc-2008.tar.lzma RMD160 SHA1 SHA256 size ;-) ... [ ok ]
 * texlive-module-hpsdiss-2008.tar.lzma RMD160 SHA1 SHA256 size ;-) ... [ ok ]
 * texlive-module-fancytooltips.doc-2008.tar.lzma RMD160 SHA1 SHA256 size ;-) ... [ ok ]
 * texlive-module-dvdcoll-2008.tar.lzma RMD160 SHA1 SHA256 size ;-) ... [ ok ]
>>> Downloading 'http://ftp.heanet.ie/pub/gentoo/distfiles/texlive-module-yafoot.source-2008.tar.lzma'
[Errno 7] Argument list too long:
   /usr/bin/wget -t 5 -T 60 --passive-ftp -O /usr/portage/distfiles/texlive-module-yafoot.source-2008.tar.lzma http://ftp.heanet.ie/pub/gentoo/distfiles/texlive-module-yafoot.source-2008.tar.lzma
[ snip a hell load of lines ]

# emerge --info
Portage 2.1.7.4 (default/linux/amd64/10.0, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.18-xen-r12 x86_64)
=================================================================
System uname: Linux-2.6.18-xen-r12-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9300_@_2.50GHz-with-gentoo-1.12.13
Timestamp of tree: Sun, 15 Nov 2009 01:45:01 +0000
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.6.2-r1
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.heanet.ie/pub/gentoo/ http://mirror.ovh.net/gentoo-distfiles/ http://mirror.cambrium.nl/pub/os/linux/gentoo/"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://192.168.3.3/gentoo-portage"
USE="X a52 aac acl alsa amd64 apache2 berkdb bzip2 cairo cli cracklib crypt cups curl dga doc dri dv dvb dvd embedded encode examples faac faad fortran gd gdbm gif gtk httpd hvm iconv imlib jadetex jpeg latex live mikmod mmx mng modules mozdevelop mp2 mp3 mudflap multilib mysql mysqli ncurses network nls nptl nptlonly openmp pam pcre pdf perl plotutils png pppd python quicktime readline reflection sdl session source spl sse sse2 ssl stream svg sysfs tcpd threads truetype unicode usb vorbis x264 xorg xv zlib" ALSA_CARDS="hda-intel" 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="nv" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Workaround to fetch files:
$ emerge -f texlive-latexextra | grep wget | grep $(grep GENTOO_MIRRORS /etc/make.conf | sed 's/.*"\(.*\)".*/\1/' | awk '{ print $1 }') > tofetch; source tofetch; rm tofetch

But even when files are fetched, it fails to set up environment:
* checking auxfile checksums ;-) ...                                                                                                                                                                                                                                           [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                                                                                                                                          [ ok ]
/usr/lib64/portage/bin/ebuild.sh: line 1704: /usr/bin/touch: Argument list too long
 * ERROR: dev-texlive/texlive-latexextra-2008-r1 failed:
 *   error processing environment
 * 
 * Call stack:
 *   ebuild.sh, line 1787:  Called die
 * The specific snippet of code:
 *      preprocess_ebuild_env || \
 *              die "error processing environment"
However, I don't see how this touch call can lead to that error, as a simple argument is being provided.

Please reopen bug
Comment 16 Zac Medico gentoo-dev 2009-11-15 20:57:07 UTC
(In reply to comment #15)
> 2.6.18-xen-r12 x86_64)

We can't really eliminate the problem with older kernels like this. Typically it's caused by extremely long variables in the environment. To troubleshoot, you can check the output of `emerge --info --verbose` for conspicuously long environment variables.
Comment 17 Étienne Buira 2009-11-15 21:31:44 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > 2.6.18-xen-r12 x86_64)
> 
> We can't really eliminate the problem with older kernels like this. Typically
> it's caused by extremely long variables in the environment. To troubleshoot,
> you can check the output of `emerge --info --verbose` for conspicuously long
> environment variables.

Old? In some sense, yes. But on the other hand, it's the "cutting hedge" for non hardmasked amd64 xen-sources!

About env length, it doesn't lie in my config:
# emerge --info --verbose | wc -L
1346
but most likely in the ebuild made environment:
# wc -L /var/tmp/portage/dev-texlive/texlive-latexextra-2008-r1/temp/environment
84936
this is SRC_URI. The next longest line is 6674 bytes long, so probably not offending.

Do you have any clue how to at least work around this bug?
Also, your fixes seems to be in portage, is that so much coupled with kernel version?
Comment 18 Zac Medico gentoo-dev 2009-11-15 22:16:25 UTC
(In reply to comment #17)
> About env length, it doesn't lie in my config:
> # emerge --info --verbose | wc -L
> 1346

1346 is pretty long. May that's it.

> but most likely in the ebuild made environment:
> # wc -L
> /var/tmp/portage/dev-texlive/texlive-latexextra-2008-r1/temp/environment
> 84936
> this is SRC_URI. The next longest line is 6674 bytes long, so probably not
> offending.

This is not he same environment that's used for fetch, so it's irrelevant to the specific problem that you have reported.

> Do you have any clue how to at least work around this bug?

Again, it might be related to the variable that is 1346 characters.
If that's not it, you can try adding a print statement on line 3524 of /usr/lib/portage/pym/portage/__init__.py in order to see exactly what environment variables are present. Something like this:

  print settings.items()

> Also, your fixes seems to be in portage, is that so much coupled with kernel
> version?

The problem only occurs under Linux with older kernels. The way that it's "fixed" for older kernels in svn r13290 is to avoid placing SRC_URI in the environment. For example, if you 'print settings.items()' as suggested above, SRC_URI should not be listed in the items that are printed.
Comment 19 Étienne Buira 2009-11-16 00:06:45 UTC
(In reply to comment #18)
> (In reply to comment #17)
> > # emerge --info --verbose | wc -L
> > 1346
> 1346 is pretty long. May that's it.

Only 19 bytes longer than USE.
1346    LS_COLORS=...
1327    USE=...
422     APACHE2_MODULES=...

> Again, it might be related to the variable that is 1346 characters.
> If that's not it, you can try adding a print statement on line 3524 of
> /usr/lib/portage/pym/portage/__init__.py in order to see exactly what
> environment variables are present. Something like this:
> 
>   print settings.items()

Yep, I tried to do it, but it seems we have different versions (mine shows tag # $Id: __init__.py 14759 2009-10-31 19:44:18Z zmedico $). The closest I found is on line 3753, in the end of def environ(self), but I know barely nothing on Python nor on Portage internals (both are in my TODO :).
I added print (mydict.items()) and print(settings.items()). About settings, it fails (undefined).
After removing the print settings, I could run until the infamous "Argument list too long" ; and in the last mydict block (environment made quite a lot of times!), I could see two elements, "A" and "AA" which are equal to the overlong SRC_URI (at least seems to).

> > Also, your fixes seems to be in portage, is that so much coupled with kernel
> > version?
> The problem only occurs under Linux with older kernels. The way that it's
> "fixed" for older kernels in svn r13290 is to avoid placing SRC_URI in the
> environment. For example, if you 'print settings.items()' as suggested above,
> SRC_URI should not be listed in the items that are printed.

I did the same, adding in the end of environ() 'mydict.pop("A", None)\nmydict.pop("AA", None)'.
This seems to have fixed the build for this package! Even if I had to remove the pops to update another package which had to download patches.

Strangely, on another box (same portage version, tree, profile, newer kernel 2.6.30-gentoo-r4), I could emerge texlive-latexextra without trouble, despite ARG_MAX is the same in both /usr/src/linux/include/linux/limits.h (131072).

So now it's a "work for me", but shouldn't that be fixed in a way or another? Like avoiding overlong SRC_URI (other vars as well?), splitting it, or whatever. IMHO, xen-sources kernels should be supported, even if most recent version is quite old. Or in a very last resort, masking xen-sources, but I would definitely vote against that.

Thanks a lot for the tip!
Comment 20 Zac Medico gentoo-dev 2009-11-16 00:17:47 UTC
(In reply to comment #19)
> I did the same, adding in the end of environ() 'mydict.pop("A",
> None)\nmydict.pop("AA", None)'.
> This seems to have fixed the build for this package! Even if I had to remove
> the pops to update another package which had to download patches.

That's not a workable fix because A is usually required. However, the longer AA is no longer supported in EAPI 3, so eventually it will become irrelevant.

> Strangely, on another box (same portage version, tree, profile, newer kernel
> 2.6.30-gentoo-r4), I could emerge texlive-latexextra without trouble, despite
> ARG_MAX is the same in both /usr/src/linux/include/linux/limits.h (131072).

For newer kernels, the ARG_MAX value listed there is irrelevant. You can also use `getconf ARG_MAX` but I'm not sure how relevant that is (it's supposed to be practically unlimited on the kernel side iirc, but not really sure about the glibc side).

> So now it's a "work for me", but shouldn't that be fixed in a way or another?
> Like avoiding overlong SRC_URI (other vars as well?), splitting it, or
> whatever. IMHO, xen-sources kernels should be supported, even if most recent
> version is quite old. Or in a very last resort, masking xen-sources, but I
> would definitely vote against that.

Considering that all is well in newer kernels, I'd vote for masking older kernels.