[Aptitude-devel] Bug#815690: aptitude: regression in version 0.7.6 wrt. cli search display through pipes

nkiesel nk at iname.com
Tue Feb 23 18:34:36 GMT 2016

Package: aptitude
Version: 0.7.6-1
Severity: normal

Dear Maintainer,

version 0.7.6 changed the way output formatting is handled for the CLI version,
and I consider that a regression.

I use something like `aptitude search '~N' > t; less t`.  This used to truncate
the output, but aptitude honored the `-w` switch, thus `aptitude search -w
$COLUMNS > t; less t` worked in 0.7.4.

0.7.6 no longer allws that. Even specifying an output format using `-F` is
silently ignored as soon as the output is redirected or piped.

I consider that a regression.  Actually, I never really understood why aptitude
tried to recognize this situation in the first place.  If the idea is to allow
an easier parsing, the caller should simply use a proper -F argument (of
course; this also no longer works with 0.7.6).  Or perhaps add a `-m|--machine-
friendly` parameter that forces this output format.

So please reconsider your decision wrt. redirection detection.  Minimally, I
would expect that `-F` is honored.  But ideally aptitude should just stop
trying to be too smart here and simply produce the same output independent of
if it goes to a terminal or something else.

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

aptitude version information:
aptitude 0.7.6
Compiler: g++ 5.3.1 20160220
Compiled against:
  apt version 5.0.0
  NCurses version 6.0
  libsigc++ version: 2.6.2
  Gtk+ support disabled.
  Qt support disabled.

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

aptitude linkage:
	linux-vdso.so.1 (0x00007ffce48d8000)
	libapt-pkg.so.5.0 => /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0 (0x00007fb4cf6d7000)
	libncursesw.so.5 => /lib/x86_64-linux-gnu/libncursesw.so.5 (0x00007fb4cf4a7000)
	libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007fb4cf27c000)
	libsigc-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0 (0x00007fb4cf076000)
	libcwidget.so.3 => /usr/lib/x86_64-linux-gnu/libcwidget.so.3 (0x00007fb4ced79000)
	libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007fb4ceaa2000)
	libboost_iostreams.so.1.58.0 => /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.58.0 (0x00007fb4ce888000)
	libboost_filesystem.so.1.58.0 => /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0 (0x00007fb4ce66f000)
	libboost_system.so.1.58.0 => /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0 (0x00007fb4ce46a000)
	libxapian.so.22 => /usr/lib/x86_64-linux-gnu/libxapian.so.22 (0x00007fb4ce066000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb4cde49000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fb4cdacd000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb4cd7c8000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fb4cd5b2000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb4cd20d000)
	libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007fb4cd00a000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb4cce06000)
	libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fb4ccbee000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fb4cc9d3000)
	libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007fb4cc7c3000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fb4cc59f000)
	liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007fb4cc38d000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fb4cc184000)
	libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fb4cbf7f000)
	/lib64/ld-linux-x86-64.so.2 (0x0000557edcb25000)

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

Kernel: Linux 4.4.0-1-amd64 (SMP w/8 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.7.6-1
ii  libapt-pkg5.0              1.2.3
ii  libboost-filesystem1.58.0  1.58.0+dfsg-5+b1
ii  libboost-iostreams1.58.0   1.58.0+dfsg-5+b1
ii  libboost-system1.58.0      1.58.0+dfsg-5+b1
ii  libc6                      2.21-9
ii  libcwidget3v5              0.5.17-4+b1
ii  libgcc1                    1:5.3.1-9
ii  libncursesw5               6.0+20160213-1
ii  libsigc++-2.0-0v5          2.6.2-1
ii  libsqlite3-0               3.11.0-1
ii  libstdc++6                 5.3.1-9
ii  libtinfo5                  6.0+20160213-1
ii  libxapian22v5              1.2.22-1

Versions of packages aptitude recommends:
ii  aptitude-doc-en [aptitude-doc]  0.7.6-1
ii  libparse-debianchangelog-perl   1.2.0-8
ii  sensible-utils                  0.0.9

Versions of packages aptitude suggests:
pn  apt-xapian-index  <none>
pn  debtags           <none>
ii  tasksel           3.34

-- no debconf information

More information about the Aptitude-devel mailing list