[Aptitude-devel] Bug#834402: aptitude: search loses column format when redirected or piped

Yuri D'Elia wavexx at thregr.org
Fri Nov 18 17:09:44 UTC 2016


Package: aptitude
Version: 0.8.3-1+b2
Followup-For: Bug #834402

I also consider this a regression. For instance, see this example:

aptitude -s search -F '%c%M %p' '~i' > status.txt

The width doesn't matter, I'm logging the output for archival. I actually
*want* infinite width.

But %M is now expanded to the empty string when missing, causing the output to
be mis-aligned. Fine, but consider the following tweak:

aptitude -s search -F '%c%1M %p' '~i' > status.txt

it *still* expands to empty, even though I'm requesting 1 column of output with
%1M in any condition.

This is broken.

-- Package-specific info:
Terminal: rxvt-unicode-256color
$DISPLAY is set.
which aptitude: /usr/bin/aptitude

aptitude version information:
aptitude 0.8.3
Compiler: g++ 6.2.0 20161103
Compiled against:
  apt version 5.0.0
  NCurses version 6.0
  libsigc++ version: 2.10.0
  Gtk+ support disabled.
  Qt support disabled.

Current library versions:
  NCurses version: ncurses 6.0.20160917
  cwidget version: 0.5.17
  Apt version: 5.0.0

aptitude linkage:
	linux-vdso.so.1 (0x00007ffcd5b67000)
	libapt-pkg.so.5.0 => /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0 (0x00007fb2ddf5f000)
	libncursesw.so.5 => /lib/x86_64-linux-gnu/libncursesw.so.5 (0x00007fb2ddd2f000)
	libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007fb2ddb05000)
	libsigc-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0 (0x00007fb2dd8fe000)
	libcwidget.so.3 => /usr/lib/x86_64-linux-gnu/libcwidget.so.3 (0x00007fb2dd601000)
	libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007fb2dd2f7000)
	libboost_iostreams.so.1.62.0 => /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.62.0 (0x00007fb2dd0df000)
	libboost_filesystem.so.1.62.0 => /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.62.0 (0x00007fb2dcec6000)
	libboost_system.so.1.62.0 => /usr/lib/x86_64-linux-gnu/libboost_system.so.1.62.0 (0x00007fb2dccc2000)
	libxapian.so.30 => /usr/lib/x86_64-linux-gnu/libxapian.so.30 (0x00007fb2dc8b4000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb2dc697000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb2dc314000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb2dc010000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb2dbdf9000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb2dba5b000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb2db857000)
	libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fb2db640000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fb2db424000)
	libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007fb2db214000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fb2dafee000)
	liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007fb2daddc000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fb2dabd4000)
	libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fb2da9cd000)
	/lib64/ld-linux-x86-64.so.2 (0x000055d973091000)

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (900, 'unstable'), (800, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.8.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (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.1
ii  libboost-filesystem1.62.0  1.62.0+dfsg-4
ii  libboost-iostreams1.62.0   1.62.0+dfsg-4
ii  libboost-system1.62.0      1.62.0+dfsg-4
ii  libc6                      2.24-5
ii  libcwidget3v5              0.5.17-4+b1
ii  libgcc1                    1:6.2.0-13
ii  libncursesw5               6.0+20160917-1
ii  libsigc++-2.0-0v5          2.10.0-1
ii  libsqlite3-0               3.15.1-1
ii  libstdc++6                 6.2.0-13
ii  libtinfo5                  6.0+20160917-1
ii  libxapian30                1.4.1-1

Versions of packages aptitude recommends:
ii  libparse-debianchangelog-perl  1.2.0-11
ii  sensible-utils                 0.0.9

Versions of packages aptitude suggests:
ii  apt-xapian-index                0.49
pn  aptitude-doc-en | aptitude-doc  <none>
ii  debtags                         2.1.2
pn  tasksel                         <none>



More information about the Aptitude-devel mailing list