[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#174869: dpkg -l doesn't show full package names



Package: dpkg
Version: 1.10.9

# dpkg -l 'kernel-pcmcia*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
un  kernel-pcmcia- <none>         (no description available)
un  kernel-pcmcia- <none>         (no description available)
un  kernel-pcmcia- <none>         (no description available)
un  kernel-pcmcia- <none>         (no description available)
un  kernel-pcmcia- <none>         (no description available)
un  kernel-pcmcia- <none>         (no description available)
ii  kernel-pcmcia- 2.4.19-4       Mainstream PCMCIA modules 2.4.19 on PPro/Cel

Informative, no?  There doesn't seem to be any way to stop dpkg -l
truncating the package names.  Particularly annoying when I'm using
dpkg -l for its globbing capability, where the package name (usually
the far end of the package name) is the part of the output that I'm most
interested in.

I've found a partial workaround.  By lying about the terminal width
(through stty), I can get dpkg to use a wider field for the package name.
But it still truncates to whatever field width it decides on, and if I
give a really enormous terminal width (to make the field `big enough')
then each line of output is really enormous.  This also only works when
output is directly to a tty: when outputting to a pipe (e.g., a pipe to
less) it reverts to 80 column output, with the results shown above.

In my opinion, the package name is such a fundamentally important part
of dpkg -l output that it should never be truncated at all.  Version
numbers and descriptions can be relegated to a second line if necessary.
But I don't particularly want to argue the case to change the default
behaviour, so if you're particularly fond of the current behaviour then
I'll be happy with merely an option for the non-truncating behaviour
(perhaps -w, a la ps).

-zefram



Reply to: