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

Reply via email to