apt should use color output

Bug #262227 reported by maxauthority
50
This bug affects 9 people
Affects Status Importance Assigned to Milestone
apt (Debian)
New
Unknown
Nominated for Experimental by Mike "Jrand0m" Stetsyshyn
Nominated for Sid by Mike "Jrand0m" Stetsyshyn
Nominated for Squeeze by Mike "Jrand0m" Stetsyshyn
dpkg (Ubuntu)
New
Wishlist
Unassigned

Bug Description

Binary package hint: apt

If somebody has ever used gentoo, one will see the difference between "emerge" and "apt-get" (and friends) immediately:

emerge highlights useful information like package names or errors with color (on color terminals), apt-get does not.
Especially for longer output like that one:
-------------------------------------------
maxauthority@mst-ubuntu:~$ sudo apt-get install mplayer-nogui
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libdvdnav4 libenca0 libfaac0 libfreebob0 libggi2 libgii1 libgii1-target-x libjack0 libsvga1
  libx264-57 libxvidcore4
Suggested packages:
  libggi-target-emu libggi-target-monotext libggimisc2 jackd ladspa-sdk libdvdcss mplayer-doc
  w32codecs
Recommended packages:
  libggi-target-x libggi-target
The following NEW packages will be installed:
  libdvdnav4 libenca0 libfaac0 libfreebob0 libggi2 libgii1 libgii1-target-x libjack0 libsvga1
  libx264-57 libxvidcore4 mplayer-nogui
0 upgraded, 12 newly installed, 0 to remove and 5 not upgraded.
Need to get 5856kB of archives.
After this operation, 14.6MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://at.archive.ubuntu.com hardy/universe libdvdnav4 0.1.10-0.2 [92.3kB]
Get:2 http://at.archive.ubuntu.com hardy/universe libenca0 1.9-4 [72.6kB]
Get:3 http://at.archive.ubuntu.com hardy/multiverse libfaac0 1.26-0.1ubuntu1 [61.2kB]
Get:4 http://at.archive.ubuntu.com hardy/universe libfreebob0 1.0.7-1 [153kB]
Get:5 http://at.archive.ubuntu.com hardy/universe libgii1-target-x 1:1.0.1-3 [15.9kB]
Get:6 http://at.archive.ubuntu.com hardy/universe libgii1 1:1.0.1-3 [235kB]
Get:7 http://at.archive.ubuntu.com hardy/universe libggi2 1:2.2.1-5ubuntu1 [481kB]
Get:8 http://at.archive.ubuntu.com hardy/universe libjack0 0.109.2-1ubuntu1 [118kB]
Get:9 http://at.archive.ubuntu.com hardy/universe libsvga1 1:1.4.3-24 [310kB]
Get:10 http://at.archive.ubuntu.com hardy/multiverse libx264-57 1:0.svn20071224-0.0ubuntu1 [253kB]
Get:11 http://at.archive.ubuntu.com hardy/multiverse libxvidcore4 2:1.1.2-0.1ubuntu3 [212kB]
Get:12 http://at.archive.ubuntu.com hardy/multiverse mplayer-nogui 2:1.0~rc2-0ubuntu13 [3850kB]
Fetched 5856kB in 2min12s (44.2kB/s)
Selecting previously deselected package libdvdnav4.
(Reading database ... 129716 files and directories currently installed.)
Unpacking libdvdnav4 (from .../libdvdnav4_0.1.10-0.2_i386.deb) ...
Selecting previously deselected package libenca0.
Unpacking libenca0 (from .../libenca0_1.9-4_i386.deb) ...
Selecting previously deselected package libfaac0.
Unpacking libfaac0 (from .../libfaac0_1.26-0.1ubuntu1_i386.deb) ...
Selecting previously deselected package libfreebob0.
Unpacking libfreebob0 (from .../libfreebob0_1.0.7-1_i386.deb) ...
Selecting previously deselected package libgii1-target-x.
Unpacking libgii1-target-x (from .../libgii1-target-x_1%3a1.0.1-3_i386.deb) ...
Selecting previously deselected package libgii1.
Unpacking libgii1 (from .../libgii1_1%3a1.0.1-3_i386.deb) ...
Selecting previously deselected package libggi2.
Unpacking libggi2 (from .../libggi2_1%3a2.2.1-5ubuntu1_i386.deb) ...
Selecting previously deselected package libjack0.
Unpacking libjack0 (from .../libjack0_0.109.2-1ubuntu1_i386.deb) ...
Selecting previously deselected package libsvga1.
Unpacking libsvga1 (from .../libsvga1_1%3a1.4.3-24_i386.deb) ...
Selecting previously deselected package libx264-57.
Unpacking libx264-57 (from .../libx264-57_1%3a0.svn20071224-0.0ubuntu1_i386.deb) ...
Selecting previously deselected package libxvidcore4.
Unpacking libxvidcore4 (from .../libxvidcore4_2%3a1.1.2-0.1ubuntu3_i386.deb) ...
Selecting previously deselected package mplayer-nogui.
Unpacking mplayer-nogui (from .../mplayer-nogui_2%3a1.0~rc2-0ubuntu13_i386.deb) ...
Setting up libdvdnav4 (0.1.10-0.2) ...
-------------------------------------------

I would propose the following:
1.) All packages like libdvdnav4 or libenca0 should be colored e.g. green
2.) Filenames like .../mplayer-nogui_2%3a1.0~rc2-0ubuntu13_i386.deb be colored in e.g. blue
3.) Some other structural text like "Suggested packages:" could be done in red or maybe just in bold

These are just suggestions, of course there could be done more/better colors for other things, but you get my point.
Of course things could/should be easily made non-colorized by a config option and/or environment variable.

There is an upstream bug in debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=331201 - but it hasn't seen any comments in 3 years. Also Ubuntu is much more concerned about user friendliness for programs and for that, color in terminal programs is an absolute must.

Also look at the screenshots there: http://lwn.net/Articles/257829/ - with the colored output it is MUCH easier/quicker to see which apps are going to be installed in contrast to our uncolored apt output.

This bug should of course also include colored output for dpkg, apt-cache, etc.

Tags: color
Revision history for this message
In , =?iso-8859-15?q?I=F1aki?= (ibc) wrote : Very good idea

Many times when doing "apt-get dist-upgrade" is not easy to distinguish
packages to be installed, updated or removed, so it's possible to do the
"apt-get dist-upgrade" and delete some important packages.

Using colors could do it easier.

Revision history for this message
maxauthority (stubenschrott) wrote :
Download full text (6.5 KiB)

Binary package hint: apt

If somebody has ever used gentoo, one will see the difference between "emerge" and "apt-get" (and friends) immediately:

emerge highlights useful information like package names or errors with color (on color terminals), apt-get does not.
Especially for longer output like that one:
-------------------------------------------
maxauthority@mst-ubuntu:~$ sudo apt-get install mplayer-nogui
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libdvdnav4 libenca0 libfaac0 libfreebob0 libggi2 libgii1 libgii1-target-x libjack0 libsvga1
  libx264-57 libxvidcore4
Suggested packages:
  libggi-target-emu libggi-target-monotext libggimisc2 jackd ladspa-sdk libdvdcss mplayer-doc
  w32codecs
Recommended packages:
  libggi-target-x libggi-target
The following NEW packages will be installed:
  libdvdnav4 libenca0 libfaac0 libfreebob0 libggi2 libgii1 libgii1-target-x libjack0 libsvga1
  libx264-57 libxvidcore4 mplayer-nogui
0 upgraded, 12 newly installed, 0 to remove and 5 not upgraded.
Need to get 5856kB of archives.
After this operation, 14.6MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://at.archive.ubuntu.com hardy/universe libdvdnav4 0.1.10-0.2 [92.3kB]
Get:2 http://at.archive.ubuntu.com hardy/universe libenca0 1.9-4 [72.6kB]
Get:3 http://at.archive.ubuntu.com hardy/multiverse libfaac0 1.26-0.1ubuntu1 [61.2kB]
Get:4 http://at.archive.ubuntu.com hardy/universe libfreebob0 1.0.7-1 [153kB]
Get:5 http://at.archive.ubuntu.com hardy/universe libgii1-target-x 1:1.0.1-3 [15.9kB]
Get:6 http://at.archive.ubuntu.com hardy/universe libgii1 1:1.0.1-3 [235kB]
Get:7 http://at.archive.ubuntu.com hardy/universe libggi2 1:2.2.1-5ubuntu1 [481kB]
Get:8 http://at.archive.ubuntu.com hardy/universe libjack0 0.109.2-1ubuntu1 [118kB]
Get:9 http://at.archive.ubuntu.com hardy/universe libsvga1 1:1.4.3-24 [310kB]
Get:10 http://at.archive.ubuntu.com hardy/multiverse libx264-57 1:0.svn20071224-0.0ubuntu1 [253kB]
Get:11 http://at.archive.ubuntu.com hardy/multiverse libxvidcore4 2:1.1.2-0.1ubuntu3 [212kB]
Get:12 http://at.archive.ubuntu.com hardy/multiverse mplayer-nogui 2:1.0~...

Read more...

description: updated
Revision history for this message
Justin Richards (ratmandu) wrote :

Agreed, The list of packages should also have some better, more obvious seperation (newlines maybe?) to make it easier to skim through. The fact that ubuntu does not use color to its full advantage on the commandline is frankly appalling. It is one of the things that has turned me off of ubuntu for quite a while. With gentoo, color is used well. It is used by default on the 'ls' command, making things look a lot better, and clearer. No color means things look unorganized and ugly.

Revision history for this message
Christoph Schmied (schmiedc) wrote :

Since what you submitted is a Feature Request to improve Ubuntu, you are invited to post your idea in Ubuntu Brainstorm at [WWW] https://brainstorm.ubuntu.com/ where it can be discussed, voted by the community and reviewed by developers. Thanks for taking the time to share your opinion!

Markus Korn (thekorn)
Changed in apt:
importance: Undecided → Wishlist
Revision history for this message
maxauthority (stubenschrott) wrote :

Thanks for your advice, I just saw that there is already such a wish there which got some positive feedback:

http://brainstorm.ubuntu.com/idea/10957/

---------------
A little off-topic, but the current Firefox3.1 nightly at least gives me this error, when going to https://brainstorm.ubuntu.com (the http-version works):

** Secure Connection Failed **

An error occurred during a connection to brainstorm.ubuntu.com.

SSL received a record that exceeded the maximum permissible length.

(Error code: ssl_error_rx_record_too_long)

The page you are trying to view can not be shown because the authenticity of the received data could not be verified.

    * Please contact the web site owners to inform them of this problem.

Changed in apt:
status: Unknown → New
Revision history for this message
Zoran Olujić (olujicz) wrote :

I found on Sidux forum some experimental APT patches, and one is for color output.

Link: http://sidux.com/PNphpBB2-viewtopic-t-16282.html

Changed in apt (Ubuntu):
status: New → Confirmed
Revision history for this message
Julian Andres Klode (juliank) wrote :

We're not Gentoo. I do not think that a colorful APT is useful, and APT does not display most of the messages, that's dpkg. And I do not think that dpkg maintainers are interested in that either.

Changed in apt (Ubuntu):
status: Confirmed → Opinion
Revision history for this message
Igor Santos (igorsantos07) wrote :

What a rude answer, @juliank!
I must agree with the reporter since that would help a lot people using coloured terminals, as apt/dpkg outputs a LOT of useless information, and it' s quite hard to read through all that to understand what packages are being installed.

Why is it that weird to have couloured output? What's wrong with that? That would make using the command-line tools much easier and friendlier.
Please, rationalize further than "not useful, we are not insterested".

Revision history for this message
Julian Andres Klode (juliank) wrote :

There's not much we can do here. We do not display the messages in APT that this bug is about.

I'm not trying to be rude, but I just do not see any advantage in the colouring scheme proposed by the bug reporter. Colouring itself might be useful in some situations, yes, but only if the important things are highlighted, and not the unimportant ones.

Reassigning that to dpkg. APT now has some colourisation where possible and appropriate (for example, apt list).

affects: apt (Ubuntu) → dpkg (Ubuntu)
Changed in dpkg (Ubuntu):
status: Opinion → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.