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

Bug#261822: dpkg -l behavior breaks expected 'pipe output' behavior



Package: dpkg
Version: 1.10.23
Severity: normal

The output behaviour of dpkg deviates from the expected normal
when the output is sent through a pipe.

Traditionally I can take any unix application, run the command
and then re-run the same command and pipe the output to 
another command. The second command should see exactly what
I got on screen.

With dpkg the pipe'd output defaults to 80 characters wide, 
but my xterm may be 150 wide... dpkg then modifies the 
output going to the pipe by adjusting the column widths
accordingly. 'grep' will then fail to find in the pipe'd
output any regular expressions which match overlong package
names in the displayed output.

eg:

luggage:~> dpkg -l "kernel-source*"
gives ( amongst other output )
un  kernel-source-2.4.21             <none> (no description available)
un  kernel-source-2.4.22             <none> (no description available)
un  kernel-source-2.4.23             <none> (no description available)
un  kernel-source-2.4.24             <none> (no description available)
un  kernel-source-2.4.25             <none> (no description available)
un  kernel-source-2.4.26             <none> (no description available)

and a grep for one of the kernel-source packages fails
luggage:~> dpkg -l "kernel-source*" | grep kernel-source-2.4.22
luggage:~>

dpkg should default to a normal piped output of assuming unlimited
line length


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.7-1-686
Locale: LANG=en_IE@euro, LC_CTYPE=en_IE@euro

Versions of packages dpkg depends on:
ii  dselect                     1.10.23      a user tool to manage Debian packa
ii  libc6                       2.3.2.ds1-13 GNU C Library: Shared libraries an

-- no debconf information



Reply to: