Bug#917098: dpkg -l 'w*' displays 'un' packages

2018-12-22 Thread Guillem Jover
Hi!

On Sat, 2018-12-22 at 17:31:31 +0200, Alexandros Prekates wrote:
> Package: dpkg
> Version: 1.18.25
> Severity: normal

> In a new installed system with Debian 9.6
> 
> $ dpkg -l
> 
> will list only packages with 'ii' state and a couple of 'rc'.
> 
> But if i  run:
> 
> $ dpkg -l w*(or dpkg -l 'w*' , it doesnt matter in a current dir with no
> 'w' files.)
> 
> i will get a dozen also of 'un' packages.
> 
> So i dont understand the logic of altering the output when
> i use a pattern . I would expect to see only 'ii' packages starting
> from the letter 'w' .

This behavior is documented in the dpkg-query man page. If it's not
clear I guess I could make it more clear by explicitly mentioning that
when a pattern is specified no filtering is performed.

For the logic, I can only assume, it's because with «dpkg-query -l»
you'd want only the most ovbious relevant view of the current state,
which would be all packages except not-installed ones. And when you
request a specific pattern then that should be respected regardless
of its state.

> Some of the listed 'un' packages are virtual, or pure virtual and some
> even dont exist anymore  , like 'wink' , but i found also 'un'
> packages that seem ordinary packages.
> 
> So basically i get output that dont make sense to me. How
> to intepret it?

Any package dpkg has seen in any place where it can see package names
is added to the package list, this includes package names in
dependency fields for example (such as Recommends, Suggests, Conflicts,
Breaks or Enhances).

> Also i dont understand why in a new system dpkg would know
> anything about uninstalled packages! (unless ofcouse as
> man dpkg-query reports are previous installed ones).

See above.

Thanks,
Guillem



Bug#917098: dpkg -l 'w*' displays 'un' packages

2018-12-22 Thread Alexandros Prekates
Package: dpkg
Version: 1.18.25
Severity: normal


Dear Maintainer,

In a new installed system with Debian 9.6

$ dpkg -l

will list only packages with 'ii' state and a couple of 'rc'.

But if i  run:

$ dpkg -l w*(or dpkg -l 'w*' , it doesnt matter in a current dir with no
'w' files.)

i will get a dozen also of 'un' packages.

So i dont understand the logic of altering the output when
i use a pattern . I would expect to see only 'ii' packages starting
from the letter 'w' .

Some of the listed 'un' packages are virtual, or pure virtual and some
even dont exist anymore  , like 'wink' , but i found also 'un'
packages that seem ordinary packages.

So basically i get output that dont make sense to me. How
to intepret it?

Also i dont understand why in a new system dpkg would know
anything about uninstalled packages! (unless ofcouse as
man dpkg-query reports are previous installed ones).




-- System Information:
Debian Release: 9.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-7-amd64 (SMP w/8 CPU cores)
Locale: LANG=el_GR.UTF-8, LC_CTYPE=el_GR.UTF-8 (charmap=UTF-8), LANGUAGE= 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages dpkg depends on:
ii  libbz2-1.0   1.0.6-8.1
ii  libc62.24-11+deb9u3
ii  liblzma5 5.2.2-1.2+b1
ii  libselinux1  2.6-3+b3
ii  tar  1.29b-1.1
ii  zlib1g   1:1.2.8.dfsg-5

dpkg recommends no packages.

Versions of packages dpkg suggests:
ii  apt1.4.8
pn  debsig-verify  

-- no debconf information