Trying to emerge e.g. app-office/libreoffice-3.4.4.2-r1 fail with the following error if outpur is piped e.g. to tee or redirected to a file: >>> Emerging (1 of 3) app-office/libreoffice-3.4.4.2-r1 * libreoffice-branding-gentoo-0.3.tar.xz RMD160 SHA1 SHA256 size ;-) ...[ ok ] * libreoffice-3.4.4.2-patchset-01.tar.xz RMD160 SHA1 SHA256 size ;-) ...[ ok ] * libreoffice-bootstrap-3.4.4.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * libreoffice-artwork-3.4.4.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * libreoffice-base-3.4.4.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * libreoffice-calc-3.4.4.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * libreoffice-components-3.4.4.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...[ ok ] * libreoffice-extensions-3.4.4.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...[ ok ] * libreoffice-extras-3.4.4.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * libreoffice-filters-3.4.4.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * libreoffice-help-3.4.4.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * libreoffice-impress-3.4.4.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * libreoffice-libs-core-3.4.4.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * libreoffice-libs-extern-3.4.4.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * libreoffice-libs-extern-sys-3.4.4.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * libreoffice-libs-gui-3.4.4.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * libreoffice-postprocess-3.4.4.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * libreoffice-sdk-3.4.4.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * libreoffice-testing-3.4.4.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * libreoffice-ure-3.4.4.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * libreoffice-writer-3.4.4.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * 128cfc86ed5953e57fe0f5ae98b62c2e-libtextcat-2.2.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ] * 17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip RMD160 SHA1 SHA256 size ;-) ... [ ok ] * bd30e9cf5523cdfc019b94f5e1d7fd19-cppunit-1.12.1.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ] * 1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ] * fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz RMD160 SHA1 SHA256 size ;-) ... [ ok ] * 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip RMD160 SHA1 SHA256 size ;-) ... [ ok ] * 35c94d2df8893241173de1d16b6034c0-swingExSrc.zip RMD160 SHA1 SHA256 size ;-) ... [ ok ] * b4cae0700aa1c2aef7eb7f345365e6f1-translate-toolkit-1.8.1.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ] * 185d60944ea767075d27247c3162b3bc-unowinreg.dll RMD160 SHA1 SHA256 size ;-) ... [ ok ] * 472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt RMD160 SHA1 SHA256 size ;-) ... [ ok ] * 53ca5e56ccd4cab3693ad32c6bd13343-Sun-ODF-Template-Pack-de_1.0.0.oxt RMD160 SHA1 SHA256 size ;-) ... [ ok ] Traceback (most recent call last): File "/usr/bin/java-config-2-2.7", line 395, in <module> (options, args) = parser.parse_args(args=args) File "/usr/lib64/python2.7/optparse.py", line 1399, in parse_args stop = self._process_args(largs, rargs, values) File "/usr/lib64/python2.7/optparse.py", line 1439, in _process_args self._process_long_opt(rargs, values) File "/usr/lib64/python2.7/optparse.py", line 1514, in _process_long_opt option.process(opt, value, values, self) File "/usr/lib64/python2.7/optparse.py", line 788, in process self.action, self.dest, opt, value, values, parser) File "/usr/lib64/python2.7/optparse.py", line 810, in take_action parser.print_help() File "/usr/lib64/python2.7/optparse.py", line 1669, in print_help file.write(self.format_help().encode(encoding, "replace")) File "/usr/lib64/python2.7/optparse.py", line 1649, in format_help result.append(self.format_option_help(formatter)) File "/usr/lib64/python2.7/optparse.py", line 1629, in format_option_help result.append(OptionContainer.format_option_help(self, formatter)) File "/usr/lib64/python2.7/optparse.py", line 1073, in format_option_help result.append(formatter.format_option(option)) File "/usr/lib64/python2.7/optparse.py", line 316, in format_option help_lines = textwrap.wrap(help_text, self.help_width) File "/usr/lib64/python2.7/textwrap.py", line 346, in wrap return w.wrap(text) File "/usr/lib64/python2.7/textwrap.py", line 321, in wrap return self._wrap_chunks(chunks) File "/usr/lib64/python2.7/textwrap.py", line 250, in _wrap_chunks raise ValueError("invalid width %r (must be > 0)" % self.width) ValueError: invalid width -27 (must be > 0) * * Can't run java-config --help * Have you upgraded python recently but haven't * run python-updater yet? * ERROR: app-office/libreoffice-3.4.4.2-r1 failed (setup phase): * Can't run java-config --help * * Call stack: * ebuild.sh, line 84: Called pkg_setup * libreoffice-3.4.4.2-r1.ebuild, line 238: Called java-pkg-opt-2_pkg_setup * java-pkg-opt-2.eclass, line 47: Called java-pkg_init * java-utils-2.eclass, line 2148: Called die * The specific snippet of code: * die "Can't run java-config --help" * * If you need support, post the output of 'emerge --info =app-office/libreoffice-3.4.4.2-r1', * the complete build log and the output of 'emerge -pqv =app-office/libreoffice-3.4.4.2-r1'. !!! When you file a bug report, please include the following information: GENTOO_VM= CLASSPATH="" JAVA_HOME="" JAVACFLAGS="" COMPILER="" and of course, the output of emerge --info * The complete build log is located at '/var/tmp/portage/app-office/libreoffice-3.4.4.2-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-office/libreoffice-3.4.4.2-r1/temp/die.env'. * S: '/var/tmp/portage/app-office/libreoffice-3.4.4.2-r1/work/libreoffice-bootstrap-3.4.4.2' >>> Failed to emerge app-office/libreoffice-3.4.4.2-r1, Log file: >>> '/var/tmp/portage/app-office/libreoffice-3.4.4.2-r1/temp/build.log' *** Resuming merge... These are the packages that would be merged, in order: Calculating dependencies ... done! * emerge --keep-going: app-office/libreoffice-l10n-3.4.4-r1 dropped due to * unsatisfied dependency. * emerge --keep-going: virtual/ooo-0 dropped due to unsatisfied dependency. * Messages for package app-office/libreoffice-3.4.4.2-r1: * * Can't run java-config --help * Have you upgraded python recently but haven't * run python-updater yet? * ERROR: app-office/libreoffice-3.4.4.2-r1 failed (setup phase): * Can't run java-config --help * * Call stack: * ebuild.sh, line 84: Called pkg_setup * libreoffice-3.4.4.2-r1.ebuild, line 238: Called java-pkg-opt-2_pkg_setup * java-pkg-opt-2.eclass, line 47: Called java-pkg_init * java-utils-2.eclass, line 2148: Called die * The specific snippet of code: * die "Can't run java-config --help" * * If you need support, post the output of 'emerge --info =app-office/libreoffice-3.4.4.2-r1', * the complete build log and the output of 'emerge -pqv =app-office/libreoffice-3.4.4.2-r1'. * The complete build log is located at '/var/tmp/portage/app-office/libreoffice-3.4.4.2-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-office/libreoffice-3.4.4.2-r1/temp/die.env'. * S: '/var/tmp/portage/app-office/libreoffice-3.4.4.2-r1/work/libreoffice-bootstrap-3.4.4.2' Ommiting the pipe or redirect emerge works as expected. Perhaps it has something to do with http://bugs.python.org/issue13107. The error came up after I've re-emerged @world. If futher information is needed please let me know. Reproducible: Always Portage 2.1.10.34 (default/linux/amd64/10.0, gcc-4.6.2, glibc-2.13-r4, 3.1.1-HAUIHAU x86_64) ================================================================= System uname: Linux-3.1.1-HAUIHAU-x86_64-Intel-R-_Core-TM-_i7-2620M_CPU_@_2.70GHz-with-gentoo-2.1 Timestamp of tree: Sun, 13 Nov 2011 18:15:01 +0000 ccache version 3.1.6 [enabled] app-shells/bash: 4.2_p10 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.2-r3, 3.2.2 dev-util/ccache: 3.1.6 dev-util/cmake: 2.8.6-r3 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.1 sys-apps/openrc: 0.9.4 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.10.3, 1.11.1-r1 sys-devel/binutils: 2.21.1-r1 sys-devel/gcc: 4.6.2 sys-devel/gcc-config: 1.5-r2 sys-devel/libtool: 2.4-r4 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 2.6.39 (virtual/os-headers) sys-libs/glibc: 2.13-r4 Repositories: gentoo x11 hauihau ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/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" CXXFLAGS="-march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--keep-going=y --quiet-build=n --with-bdeps=y" FEATURES="assume-digests binpkg-logs ccache distlocks ebuild-locks fakeroot fixlafiles metadata-transfer news parallel-fetch parallel-install protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox" FFLAGS="" GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo/" LANG="de_DE.utf8" LC_ALL="de_DE.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-znow -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--enable-new-dtags" LINGUAS="de" MAKEOPTS="-j8" 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="/var/lib/layman/x11 /var/lib/layman/hauihau" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X a52 aac aalib acl alsa amd64 apache2 bash-completion bcmath berkdb bidi bluetooth branding bzip2 cairo calendar caps cdda cddb cdparanoia cdr cli cracklib crypt ctype cups curl cxx dbus dga directfb doc dri dts dv dvd encode examples exif ffmpeg flac fontconfig fortran ftp gd gdbm gif gmp gnome gnome-keyring gphoto2 gstreamer gtk iconv icu imagemagick imap imlib ipv6 java jpeg jpeg2k kde lame latex lcms ldap libcaca libnotify libsamplerate lua lzma lzo mad matroska mhash mmap mmx mng modules mono mp3 mpeg msn mtp mudflap multilib musepack mysql mysqli ncurses networkmanager nls nptl nptlonly nsplugin offensive ogg openal opengl openmp oscar pam pcre pdf perl php plasma png policykit posix python qt4 quicktime readline ruby samba sasl sdl session sharedext smp sndfile snmp soap sockets spell sqlite sqlite3 sse sse2 ssl startup-notification subversion svg sysfs syslog tcl tcpd theora threads tidy tiff tk tokenizer truetype udev unicode usb v4l2 vcd vim-syntax vorbis wavpack x264 xattr xcb xcomposite xine xinerama xml xmlrpc xmp xorg xosd xpm xsl xv xvid yahoo 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 auth_digest authn_alias authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgid 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_ftp proxy_http rewrite setenvif so speling status substitute unique_id userdir usertrack version vhost_alias" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="canon casio_qv fuji kodak konica minolta mustek panasonic samsung sonydscf1 sonydscf55 toshiba" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="grub_platforms_efi-64" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Running "ebuild /usr/portage/app-office/libreoffice/libreoffice-3.4.4.2-r1.ebuild merge" with redirected or piped output does work. Downgrading portage to 2.1.10.32 fixes the issue.
(In reply to comment #1) > Downgrading portage to 2.1.10.32 fixes the issue. You can use emerge --quiet-build=n in order to make portage-2.1.10.34 behave like earlier versions. However, that's just a workaround. The java-config program really needs to be fixed to handle that error gracefully.
(In reply to comment #2) > You can use emerge --quiet-build=n in order to make portage-2.1.10.34 behave > like earlier versions. However, that's just a workaround. emerge -1 --quiet-build=n commons-lang | tee /dev/null fails with the same error. The problematic line from the eclass is: java-config --help >/dev/null || die "with some noise"
If you look at my emerge --info output you may see the EMERGE_DEFAULT_OPTS line which already contains the --quiet-build=n. So this is *no* workaround as it still fails. It don't know wether java-config or python itself should be fixed, because it looks like a generic problem of the optparse stuff.
*** Bug 392633 has been marked as a duplicate of this bug. ***
*** Bug 392887 has been marked as a duplicate of this bug. ***
With Portage 2.1.10.41 it works again unless using --quiet-build=y or --jobs.
Portage 2.1.10.41 does not work with --jobs=1 either. It fails with all the java stuff here
(In reply to comment #8) > Portage 2.1.10.41 does not work with --jobs=1 either. It fails with all the > java stuff here If it's like bug 394091, you can export COLUMNS=0 as a workaround.
(In reply to comment #9) > (In reply to comment #8) > > Portage 2.1.10.41 does not work with --jobs=1 either. It fails with all the > > java stuff here > > If it's like bug 394091, you can export COLUMNS=0 as a workaround. I mean export COLUMNS=80.
COLUMNS=80 emerge -1 --quiet-build=y commons-lang | tee /dev/null succeeds with Portage 2.1.10.41
(In reply to comment #11) > COLUMNS=80 emerge -1 --quiet-build=y commons-lang | tee /dev/null > succeeds with Portage 2.1.10.41 The COLUMNS=80 workaround should no longer be necessary with sys-apps/portage-2.1.10.42 and 2.2.0_alpha82. Please test.
(In reply to comment #12) > (In reply to comment #11) > > COLUMNS=80 emerge -1 --quiet-build=y commons-lang | tee /dev/null > > succeeds with Portage 2.1.10.41 > > The COLUMNS=80 workaround should no longer be necessary with > sys-apps/portage-2.1.10.42 and 2.2.0_alpha82. Please test. Works for me with 2.1.10.42, thanks.
Something like this in java-pkg_init() would probably work nicely: [[ ${COLUMNS:-0} -ge 1 ]] || export COLUMNS=80 We're using something similar for bug #394091.
Works for me with portage 2.1.10.44. Thanks you!
*** Bug 397601 has been marked as a duplicate of this bug. ***
(In reply to comment #14) > Something like this in java-pkg_init() would probably work nicely: > > [[ ${COLUMNS:-0} -ge 1 ]] || export COLUMNS=80 > > We're using something similar for bug #394091. Personally I'm not fond of adding this to the eclass as it smells like to much of a hack. Getting a Portage version >=2.1.10.42 stable would be preferable. Feel free to add it if you think there won't be any newer stable Portage within a reasonable time frame.
Portage-2.1.10.44 is stable on all stable arches -> closing. Thanks for the report.