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

Bug 85574

Summary: qpkg list error for specific packages
Product: Portage Development Reporter: Aaron Carlisle <aaron.carlisle>
Component: ToolsAssignee: Portage Tools Team <tools-portage>
Status: RESOLVED WONTFIX    
Severity: minor    
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

Description Aaron Carlisle 2005-03-16 17:19:37 UTC
Whenever I run qpkg -l with a specific package, I get an error.  qpkg -l without a specific package correctly lists the contents of every package.

Fix:

On line 332 of qpkg, there exists the following line (minus the leading tabs):

ipak=`echo ${ipak}|sed -e "s: :\n:g"|grep -i ${temp}`

The sed expression, meant to replace spaces with newlines, instead replaces spaces with the character 'n'.  The following line can be put in its place (after adding the leading tabs).

ipak=`echo ${ipak}|sed -e "y: :\n:"|grep -i ${temp}`

Alternative fix approach:

Generally, a newline can be put in the replacement string of a sed expression by preceding it with a \.  For example:

sed -e "s: :\
:g"

However, my python sophistication is such that I don't know how to pull that off in code.  The "y: :\n:" expression works fine.

Additional Notes:

Line 327 probably produces the same result when reached.

An easy workaround without a patch is for the user to display the contents of /var/db/pkg/<pkgname>/CONTENTS

Reproducible: Always
Steps to Reproduce:
1. qpkg -l <pkgname> (for example 'qpkg -l gentoolkit')
Actual Results:  
x1b[0;01m/x1b[36;01mw3m-0.5.1-r2 *x1b[0;0m
CONTENTS:
cat:
/var/db/pkg//app-portage/gentoolkit-0.2.0/gentoolkit-0.2.0.ebuildn/var/db/pkg//app-text/ispell-3.2.06-r6/ispell-3.2.06-r6.ebuildn/var/db/pkg//app-text/tetex-2.0.2-r6/tetex-2.0.2-r6.ebuildn/var/db/pkg//app-text/xdvik-22.84.5/xdvik-22.84.5.ebuildn/var/db/pkg//app-vim/latexsuite-1.5/latexsuite-1.5.ebuildn/var/db/pkg//dev-libs/boehm-gc-6.4/boehm-gc-6.4.ebuildn/var/db/pkg//dev-python/python-fchksum-1.7.1/python-fchksum-1.7.1.ebuildn/var/db/pkg//dev-util/dialog-1.0.20050206/dialog-1.0.20050206.ebuildn/var/db/pkg//media-libs/audiofile-0.2.6-r1/audiofile-0.2.6-r1.ebuildn/var/db/pkg//media-libs/freetype-2.1.9-r1/freetype-2.1.9-r1.ebuildn/var/db/pkg//media-libs/libpng-1.2.8/libpng-1.2.8.ebuildn/var/db/pkg//media-libs/t1lib-5.0.2/t1lib-5.0.2.ebuildn/var/db/pkg//net-libs/libwww-5.4.0-r2/libwww-5.4.0-r2.ebuildn/var/db/pkg//net-misc/curl-7.13.1/curl-7.13.1.ebuildn/var/db/pkg//sys-apps/debianutils-1.16.7-r4/debianutils-1.16.7-r4.ebuildn/var/db/pkg//sys-apps/freebsd-stat-5.3_p20050202/freebsd-stat-5.3_p20050202.ebuildn/var/db/pkg//sys-apps/portage-2.0.51.19/portage-2.0.51.19.ebuildn/var/db/pkg//sys-apps/sed-4.1.4/sed-4.1.4.ebuildn/var/db/pkg//sys-devel/gettext-0.14.2/gettext-0.14.2.ebuildn/var/db/pkg//sys-devel/gnuconfig-20050223/gnuconfig-20050223.ebuildn/var/db/pkg//sys-libs/libsystem-7.1/libsystem-7.1.ebuildn/var/db/pkg//sys-libs/ncurses-8.1/ncurses-8.1.ebuildn/var/db/pkg//sys-libs/readline-4.3-r6/readline-4.3-r6.ebuildn/var/db/pkg//www-client/w3m-0.5.1-r2/CONTENTS:
File name too long

Expected Results:  
x1b[0;01m/x1b[36;01mgentoolkit-0.2.0 *x1b[0;0m
CONTENTS:
x1b[33;01m/usrx1b[0;0m
x1b[33;01m/usr/binx1b[0;0m
x1b[0;01m/usr/bin/equeryx1b[0;0m
x1b[0;01m/usr/bin/etcatx1b[0;0m
x1b[0;01m/usr/bin/eusex1b[0;0m
x1b[0;01m/usr/bin/glsa-checkx1b[0;0m
x1b[0;01m/usr/bin/qpkgx1b[0;0m
x1b[0;01m/usr/bin/revdep-rebuildx1b[0;0m
x1b[33;01m/usr/libx1b[0;0m
x1b[33;01m/usr/lib/gentoolkitx1b[0;0m
x1b[33;01m/usr/lib/gentoolkit/pymx1b[0;0m
x1b[33;01m/usr/lib/gentoolkit/pym/gentoolkitx1b[0;0m
x1b[0;01m/usr/lib/gentoolkit/pym/gentoolkit/__init__.pyx1b[0;0m
x1b[0;01m/usr/lib/gentoolkit/pym/gentoolkit/gentoolkit.pyx1b[0;0m
x1b[0;01m/usr/lib/gentoolkit/pym/gentoolkit/pprinter.pyx1b[0;0m
x1b[0;01m/usr/lib/gentoolkit/pym/glsa.pyx1b[0;0m
x1b[33;01m/usr/sbinx1b[0;0m
x1b[33;01m/usr/sharex1b[0;0m
x1b[33;01m/usr/share/docx1b[0;0m
x1b[33;01m/usr/share/doc/gentoolkit-0.2.0_pre10x1b[0;0m
x1b[0;01m/usr/share/doc/gentoolkit-0.2.0_pre10/AUTHORSx1b[0;0m
x1b[0;01m/usr/share/doc/gentoolkit-0.2.0_pre10/ChangeLogx1b[0;0m
x1b[0;01m/usr/share/doc/gentoolkit-0.2.0_pre10/COPYINGx1b[0;0m
x1b[33;01m/usr/share/doc/gentoolkit-0.2.0_pre10/equeryx1b[0;0m
x1b[0;01m/usr/share/doc/gentoolkit-0.2.0_pre10/equery/AUTHORSx1b[0;0m
x1b[0;01m/usr/share/doc/gentoolkit-0.2.0_pre10/equery/READMEx1b[0;0m
x1b[33;01m/usr/share/doc/gentoolkit-0.2.0_pre10/etcatx1b[0;0m
x1b[0;01m/usr/share/doc/gentoolkit-0.2.0_pre10/etcat/AUTHORSx1b[0;0m
x1b[0;01m/usr/share/doc/gentoolkit-0.2.0_pre10/etcat/READMEx1b[0;0m
x1b[33;01m/usr/share/doc/gentoolkit-0.2.0_pre10/eusex1b[0;0m
x1b[33;01m/usr/share/doc/gentoolkit-0.2.0_pre10/gentoolkitx1b[0;0m
x1b[0;01m/usr/share/doc/gentoolkit-0.2.0_pre10/gentoolkit/AUTHORSx1b[0;0m
x1b[0;01m/usr/share/doc/gentoolkit-0.2.0_pre10/gentoolkit/ChangeLogx1b[0;0m
x1b[0;01m/usr/share/doc/gentoolkit-0.2.0_pre10/gentoolkit/READMEx1b[0;0m
x1b[0;01m/usr/share/doc/gentoolkit-0.2.0_pre10/gentoolkit/TODOx1b[0;0m
x1b[0;01m/usr/share/doc/gentoolkit-0.2.0_pre10/NEWSx1b[0;0m
x1b[33;01m/usr/share/doc/gentoolkit-0.2.0_pre10/qpkgx1b[0;0m
x1b[0;01m/usr/share/doc/gentoolkit-0.2.0_pre10/qpkg/AUTHORSx1b[0;0m
x1b[0;01m/usr/share/doc/gentoolkit-0.2.0_pre10/qpkg/ChangeLogx1b[0;0m
x1b[0;01m/usr/share/doc/gentoolkit-0.2.0_pre10/qpkg/READMEx1b[0;0m
x1b[0;01m/usr/share/doc/gentoolkit-0.2.0_pre10/READMEx1b[0;0m
x1b[33;01m/usr/share/doc/gentoolkit-0.2.0_pre10/revdep-rebuildx1b[0;0m
x1b[0;01m/usr/share/doc/gentoolkit-0.2.0_pre10/revdep-rebuild/AUTHORSx1b[0;0m
x1b[0;01m/usr/share/doc/gentoolkit-0.2.0_pre10/revdep-rebuild/READMEx1b[0;0m
x1b[0;01m/usr/share/doc/gentoolkit-0.2.0_pre10/revdep-rebuild/TODOx1b[0;0m
x1b[0;01m/usr/share/doc/gentoolkit-0.2.0_pre10/TODOx1b[0;0m
x1b[33;01m/usr/share/manx1b[0;0m
x1b[33;01m/usr/share/man/man1x1b[0;0m
x1b[0;01m/usr/share/man/man1/equery.1.gzx1b[0;0m
x1b[0;01m/usr/share/man/man1/etcat.1.gzx1b[0;0m
x1b[0;01m/usr/share/man/man1/qpkg.1.gzx1b[0;0m
x1b[0;01m/usr/share/man/man1/revdep-rebuild.1.gzx1b[0;0m

!!! Relying on the shell to locate gcc, this may break
!!! DISTCC, installing gcc-config and setting your current gcc
!!! profile will fix this
Portage 2.0.51.19 (default-darwin/macos/10.3, gcc-3.3, libsystem-7.1-r0, 7.8.0
Power Macintosh)
=================================================================
System uname: 7.8.0 Power Macintosh powerpc
macos-20041118
Python:               [2.3 (#1, Sep 13 2003, 00:49:11)]
distcc 2.0.1-zeroconf powerpc-apple-darwin7.0 (protocol 1) (default port 3632)
[disabled]
dev-lang/python:     [Not Present]
sys-devel/autoconf:  [Not Present]
sys-devel/automake:  [Not Present]
sys-devel/binutils:  [Not Present]
sys-devel/libtool:   [Not Present]
virtual/os-headers:  7.1
ACCEPT_KEYWORDS="ppc-macos"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe"
CHOST="powerpc-apple-darwin"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache collision-protect distlocks userpriv"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="ppc curl emboss libwww ncurses nls png ppc-macos readline tetex"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Comment 1 Marius Mauch (RETIRED) gentoo-dev 2005-03-16 19:37:47 UTC
qpkg is being phased out, use `equery files <package>` instead.