[Aptitude-devel] Bug#757940: aptitude: TERM=dumb not respected

Andreas Tolfsen ato at mozilla.com
Tue Aug 12 15:21:34 UTC 2014


Package: aptitude
Version: 0.6.11-1
Severity: minor

Dumb terminals only support a limited number of control codes.  In
particular they do not have the ability to process ANSI escape
sequences which are commonly used for a number of aptitude's commands
to display progress of steps.

As far as I can gather this is a matter of avoiding some of the
conditionals in the switch statement in src/download_item.cc:77.
The problematic cases are the “transient” states: StatIdle,
StatFetching, and StatDone.

This makes the output of the following command rather ugly:

~ % TERM=dumb aptitude update

0% [Working]
            
Ign http://ppa.launchpad.net trusty InRelease

17% [Connecting to ftp.no.debian.org (2001:700:0:12e::f70)]
                                                           
Hit http://ppa.launchpad.net trusty Release.gpg

40% [Connecting to ftp.no.debian.org (2001:700:0:12e::f70)]
                                                           
Hit http://ppa.launchpad.net trusty Release

40% [Connecting to ftp.no.debian.org (2001:700:0:12e::f70)]
                                                           
30% [Connecting to ftp.no.debian.org (2001:700:0:12e::f70)]
                                                           
Hit http://ppa.launchpad.net trusty/main Sources

40% [Connecting to ftp.no.debian.org (2001:700:0:12e::f70)]
                                                           
Hit http://ppa.launchpad.net trusty/main amd64 Packages

50% [Connecting to ftp.no.debian.org (2001:700:0:12e::f70)] [Waiting for headers
                                                                                
Ign http://ppa.launchpad.net trusty/main Translation-en_US

60% [Waiting for headers]
                         
Ign http://ppa.launchpad.net trusty/main Translation-en

70% [Waiting for headers]
                         
Ign http://ppa.launchpad.net trusty/main Translation-en_GB

80% [Waiting for headers]
                         
Hit http://ftp.no.debian.org sid InRelease

80% [Working]
             
69% [Working]
             
Hit http://ftp.no.debian.org sid/main Sources/DiffIndex

79% [Working]
             
Hit http://ftp.no.debian.org sid/main amd64 Packages/DiffIndex

87% [Connecting to ftp.no.debian.org (2001:700:0:12e::f70)]
                                                           
Hit http://ftp.no.debian.org sid/main Translation-en/DiffIndex

94% [Working]
[  0%] Reading package lists
                            
[100%] Reading package lists
  

The expected output should be what you see in an intelligent terminal:

~ % aptitude update
Ign http://ppa.launchpad.net trusty InRelease
Hit http://ppa.launchpad.net trusty Release.gpg            
Hit http://ppa.launchpad.net trusty Release                
Hit http://ppa.launchpad.net trusty/main Sources           
Hit http://ppa.launchpad.net trusty/main amd64 Packages    
Ign http://ppa.launchpad.net trusty/main Translation-en_US 
Ign http://ppa.launchpad.net trusty/main Translation-en
Ign http://ppa.launchpad.net trusty/main Translation-en_GB
Hit http://ftp.no.debian.org sid InRelease
Hit http://ftp.no.debian.org sid/main Sources/DiffIndex
Hit http://ftp.no.debian.org sid/main amd64 Packages/DiffIndex
Hit http://ftp.no.debian.org sid/main Translation-en/DiffIndex


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

aptitude version information:
aptitude 0.6.11 compiled at Jun  9 2014 20:46:57
Compiler: g++ 4.8.3
Compiled against:
  apt version 4.12.0
  NCurses version 5.9
  libsigc++ version: 2.2.11
  Gtk+ support disabled.
  Qt support disabled.

Current library versions:
  NCurses version: ncurses 5.9.20140712
  cwidget version: 0.5.17
  Apt version: 4.12.0

aptitude linkage:
	linux-vdso.so.1 (0x00007fff8d9fe000)
	libapt-pkg.so.4.12 => /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12 (0x00007f18ac326000)
	libncursesw.so.5 => /lib/x86_64-linux-gnu/libncursesw.so.5 (0x00007f18ac0f0000)
	libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f18abec5000)
	libsigc-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0 (0x00007f18abcc0000)
	libcwidget.so.3 => /usr/lib/x86_64-linux-gnu/libcwidget.so.3 (0x00007f18ab9b9000)
	libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007f18ab6f7000)
	libboost_iostreams.so.1.55.0 => /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.55.0 (0x00007f18ab4df000)
	libxapian.so.22 => /usr/lib/libxapian.so.22 (0x00007f18ab0d4000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f18aaeb6000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f18aabab000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f18aa8aa000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f18aa693000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f18aa2ea000)
	libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f18aa0e7000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f18a9ee2000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f18a9cca000)
	libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f18a9aba000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f18a9896000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f18a968e000)
	libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f18a9488000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f18accc3000)

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

Kernel: Linux 3.14-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

Versions of packages aptitude depends on:
ii  aptitude-common           0.6.11-1
ii  libapt-pkg4.12            1.0.6
ii  libboost-iostreams1.55.0  1.55.0+dfsg-2
ii  libc6                     2.19-7
ii  libcwidget3               0.5.17-1
ii  libgcc1                   1:4.9.1-5
ii  libncursesw5              5.9+20140712-2
ii  libsigc++-2.0-0c2a        2.2.11-4
ii  libsqlite3-0              3.8.5-2
ii  libstdc++6                4.9.1-5
ii  libtinfo5                 5.9+20140712-2
ii  libxapian22               1.2.18-1

Versions of packages aptitude recommends:
pn  aptitude-doc-en | aptitude-doc  <none>
pn  libparse-debianchangelog-perl   <none>
ii  sensible-utils                  0.0.9

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

-- no debconf information



More information about the Aptitude-devel mailing list