Piping the output of 'equery g <pkgspec>' to 'head' *can* result in an IOError with Errno 32 for Broken pipe. Reproducible: Always Steps to Reproduce: 1.equery g ftpcube | head -5 2. 3. Actual Results: pansy ~ # equery g ftpcube | head -5 net-ftp/ftpcube-0.4.3-r1: `-- net-ftp/ftpcube-0.4.3-r1 `-- dev-lang/python-2.4.3-r1 (virtual/python) `-- sys-libs/zlib-1.2.3 `-- sys-libs/ncurses-5.5-r2 [ !build ncurses ] Traceback (most recent call last): File "/usr/bin/equery", line 1639, in ? cmd.perform(local_opts) File "/usr/bin/equery", line 652, in perform self._graph(pkg, opts, stats, 0, [], "") File "/usr/bin/equery", line 684, in _graph pkgtbl = self._graph(pkg, opts, stats, level+1, pkgtbl, suffix) File "/usr/bin/equery", line 684, in _graph pkgtbl = self._graph(pkg, opts, stats, level+1, pkgtbl, suffix) File "/usr/bin/equery", line 684, in _graph pkgtbl = self._graph(pkg, opts, stats, level+1, pkgtbl, suffix) File "/usr/bin/equery", line 684, in _graph pkgtbl = self._graph(pkg, opts, stats, level+1, pkgtbl, suffix) File "/usr/bin/equery", line 667, in _graph print_info(0, pfx + cpv + suffix) File "/usr/lib/gentoolkit/pym/gentoolkit/pprinter.py", line 20, in print_info sys.stdout.write(s) IOError: [Errno 32] Broken pipe Expected Results: pansy ~ # equery g ftpcube | head -5 net-ftp/ftpcube-0.4.3-r1: `-- net-ftp/ftpcube-0.4.3-r1 `-- dev-lang/python-2.4.3-r1 (virtual/python) `-- sys-libs/zlib-1.2.3 `-- sys-libs/ncurses-5.5-r2 [ !build ncurses ] pansy ~ # echo I like head! I like head!
Same problem here but also without piping. i.e. # equery depgraph amarok [ Searching for packages matching amarok... ] * dependency graph for media-sound/amarok-1.4.4-r3 `-- media-sound/amarok-1.4.4-r3 `-- kde-base/kdebase-3.5.6-r1 [ kde ] Traceback (most recent call last): File "/usr/bin/equery", line 1639, in ? cmd.perform(local_opts) File "/usr/bin/equery", line 652, in perform self._graph(pkg, opts, stats, 0, [], "") File "/usr/bin/equery", line 684, in _graph pkgtbl = self._graph(pkg, opts, stats, level+1, pkgtbl, suffix) File "/usr/bin/equery", line 675, in _graph pkg = gentoolkit.find_best_match(x[0] + cpv) File "/usr/lib/gentoolkit/pym/gentoolkit/helpers.py", line 60, in find_best_match cat,pkg,ver,rev = split_package_name(search_key) File "/usr/lib/gentoolkit/pym/gentoolkit/helpers.py", line 135, in split_package_name r = portage.catpkgsplit(name) File "/usr/lib/portage/pym/portage_versions.py", line 288, in catpkgsplit raise InvalidData("Invalid category in %s" %mydata ) portage_exception.InvalidData: Invalid category in >=media-libs/freetype-2 # emerge --info Portage 2.1.2-r7 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.4-r4, 2.6.19-gentoo-r5 i686) ================================================================= System uname: 2.6.19-gentoo-r5 i686 Intel(R) Pentium(R) 4 CPU 2.53GHz Gentoo Base System version 1.12.6 Timestamp of tree: Sun, 04 Feb 2007 14:50:01 +0000 ccache version 2.4 [enabled] dev-java/java-config: 1.3.7, 2.0.31-r3 dev-lang/python: 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.4-r6 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61 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.16.1-r3 sys-devel/gcc-config: 1.3.14 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium4 -pipe" 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/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/terminfo /etc/texmf/web2c" CXXFLAGS="-O2 -march=pentium4 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict" GENTOO_MIRRORS="http://www.die.unipd.it/pub/Linux/distributions/gentoo-sources/ http://gentoo.mirror.solnet.ch/" LANG="it_IT" LINGUAS="it" 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="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/layman/zugaina /usr/portage/local/layman/erazor /usr/portage/local/layman/science /usr/portage/local/layman/xeffects" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X alsa bash-completion berkdb bitmap-fonts bzip2 cdr clamav cli cracklib crypt cups dbus dlloader dri dvd dvdr eds emboss encode fam firefox flac fortran gdbm gif gpm gstreamer hal howl iconv imlib ipv6 isdnlog java jpeg kde lcms ldap libg++ mad midi mikmod mmx mmx2 mmxext mp3 mpeg ncurses nls nptl nptlonly ogg opengl pam pcre pdf perl png ppds pppd python qt qt3 qt4 quicktime readline reflection sdl session spell spl sse sse2 sse3 ssl svg svga tcl tcltk tcpd tetex tiff tk truetype truetype-fonts type1-fonts udev unicode vorbis win32codecs x86 xml xorg xv zlib" ALSA_CARDS="cmipci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" USERLAND="GNU" VIDEO_CARDS="fglrx" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
(In reply to comment #1) > Same problem here but also without piping. Different bug, you want bug #161995 which is fixed in Subversion and has a patch attached to the bug.
Created attachment 116630 [details, diff] Encloses sys.*.write() call in a try: except IOError: Could this be a solution?
Can't reproduce this bug in the current gentoolkit, closing.