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

aptitude why (Was: Re: After software update systemd runs into timeouts)



David Wright <deblis@lionunicorn.co.uk> writes:

> On Wed 05 Aug 2020 at 22:53:26 (+0200), Urs Thuermann wrote:
> 
> > Should this be considered a bug?  Shouldn't 'aptitude why' show the
> > packages that depend on it?
> 
> Why not read the man page:
> 
>        Note
>        aptitude why does not perform full dependency
>        resolution; it only displays direct relationships
>        between packages. For instance, if A requires B, C
>        requires D, and B and C conflict, â??aptitude why-not Dâ??
>        will not produce the answer â??A depends on B, B
>        conflicts with C, and D depends on Câ??.
> 
>    By default aptitude outputs only the "most installed,
>    strongest, tightest, shortest" dependency chain. That is,
>    it looks for a chain that only contains packages which are
>    installed or will be installed; it looks for the strongest
>    possible dependencies under that restriction; it looks for
>    chains that avoid ORed dependencies and Provides; and it
>    looks for the shortest dependency chain meeting those
>    criteria. These rules are progressively weakened until a
>    match is found.

This is exactly what made me think it is a bug.  aptitude should show
the strongest chain, and "Depends" is stronger than "Recommends".  But
aptitude shows a "Recommends" although a "Depends" exists:

$ aptitude why libpam-systemd
i   systemd Recommends libpam-systemd
$ aptitude why policykit-1 libpam-systemd
i A policykit-1 Depends libpam-systemd

But now I see reason: policykit-1 is also installed only because
virt-manager *recommends* libvirt-daemon-system which depends on
policykit-1:

$ aptitude why virt-manager libpam-systemd
i   virt-manager          Recommends libvirt-daemon-system (>= 1.2.7)
i A libvirt-daemon-system Depends    policykit-1
i A policykit-1           Depends    libpam-systemd

But since that chain is longer, aptitude shows the recommendation of
systemd.  In the output of aptitude purge in my other mail I hadn't
realized that libvirt-daemon-system is also only automatically
installed.

But thanks anyway for pointing out these sections of the man page.  I
wasn't aware of all the details and now understand better what
aptitude does.

urs


Reply to: