[Aptitude-devel] Bug#834402: aptitude: search loses column format when redirected or piped
Javier Cantero
jcantero at escomposlinux.org
Mon Aug 15 10:24:22 UTC 2016
Package: aptitude
Version: 0.8.3-1
Severity: normal
Dear Maintainer,
Compare this:
$ aptitude search "~i aptitude"
i aptitude 0.8.3-1 - gestor de paquetes basado en terminal
i A aptitude-common 0.8.3-1 - architecture independent files for the aptitude package manager
with the same output piped through `less`:
$ aptitude search "~i aptitude" | less
i aptitude 0.8.3-1 - gestor de paquetes basado en terminal
i A aptitude-common 0.8.3-1 - architecture independent files for the aptitude package manager
The same happens if the output is redirected to a file:
$ aptitude search "~i aptitude" > kk.txt
$ cat kk.txt
i aptitude 0.8.3-1 - gestor de paquetes basado en terminal
i A aptitude-common 0.8.3-1 - architecture independent files for the aptitude package manager
I've already read the discussion in #815690. but the thing is: piping to
more/less is a very common usage of aptitude search (since the lists of
packages tend to be very long), not just a special case for automatic
processing of the output. It's really annoying to have to remember to add
an arbitrary[*] width using `-w` in every `aptitude search ... | less`,
especially when it's a significant deviation from previous behaviour.
[*] arbitrary because usually it doesn't matter the actual width
-- Package-specific info:
Terminal: xterm
$DISPLAY is set.
which aptitude: /usr/bin/aptitude
aptitude version information:
aptitude 0.8.3
Compiler: g++ 6.1.1 20160802
Compiled against:
apt version 5.0.0
NCurses version 6.0
libsigc++ version: 2.8.0
Gtk+ support disabled.
Qt support disabled.
Current library versions:
NCurses version: ncurses 6.0.20160625
cwidget version: 0.5.17
Apt version: 5.0.0
aptitude linkage:
linux-vdso.so.1 (0x00007fffd27cc000)
libapt-pkg.so.5.0 => /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0 (0x00007faf90684000)
libncursesw.so.5 => /lib/x86_64-linux-gnu/libncursesw.so.5 (0x00007faf90454000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007faf90229000)
libsigc-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0 (0x00007faf90022000)
libcwidget.so.3 => /usr/lib/x86_64-linux-gnu/libcwidget.so.3 (0x00007faf8fd25000)
libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007faf8fa20000)
libboost_iostreams.so.1.61.0 => /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.61.0 (0x00007faf8f808000)
libboost_filesystem.so.1.61.0 => /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.61.0 (0x00007faf8f5ef000)
libboost_system.so.1.61.0 => /usr/lib/x86_64-linux-gnu/libboost_system.so.1.61.0 (0x00007faf8f3ea000)
libxapian.so.22 => /usr/lib/x86_64-linux-gnu/libxapian.so.22 (0x00007faf8efe6000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007faf8edc9000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007faf8ea47000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007faf8e742000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007faf8e52c000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007faf8e18a000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007faf8df87000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007faf8dd83000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007faf8db6b000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007faf8d950000)
libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007faf8d740000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007faf8d51c000)
liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007faf8d30a000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007faf8d101000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007faf8cefc000)
/lib64/ld-linux-x86-64.so.2 (0x00005571f0e7b000)
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (600, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.6.6-amd64 (SMP w/4 CPU cores)
Locale: LANG=es_ES.utf8, LC_CTYPE=es_ES.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages aptitude depends on:
ii aptitude-common 0.8.3-1
ii libapt-pkg5.0 1.3~pre3
ii libboost-filesystem1.61.0 1.61.0+dfsg-2.1
ii libboost-iostreams1.61.0 1.61.0+dfsg-2.1
ii libboost-system1.61.0 1.61.0+dfsg-2.1
ii libc6 2.23-4
ii libcwidget3v5 0.5.17-4+b1
ii libgcc1 1:6.1.1-11
ii libncursesw5 6.0+20160625-1
ii libsigc++-2.0-0v5 2.8.0-2
ii libsqlite3-0 3.13.0-1
ii libstdc++6 6.1.1-11
ii libtinfo5 6.0+20160625-1
ii libxapian22v5 1.2.23-1
Versions of packages aptitude recommends:
pn libparse-debianchangelog-perl <none>
ii sensible-utils 0.0.9
Versions of packages aptitude suggests:
pn apt-xapian-index <none>
pn aptitude-doc-en | aptitude-doc <none>
pn debtags <none>
ii tasksel 3.35
-- no debconf information
--
Saludos de Javier <jcantero at escomposlinux.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/aptitude-devel/attachments/20160815/1a7b9259/attachment.sig>
More information about the Aptitude-devel
mailing list