:: Re: [DNG] Keeping unneeded packages…
Etusivu
Poista viesti
Vastaa
Lähettäjä: Olaf Meeuwissen
Päiväys:  
Vastaanottaja: Alessandro Vesely
Kopio: dng
Uudet otsikot: [DNG] Flatpaks (was: Keeping unneeded packages of your system)
Aihe: Re: [DNG] Keeping unneeded packages of your system (was Re: Advice to migrate from Beowulf to Chimaera)
Hi,

Alessandro Vesely via Dng writes:

> On Wed 28/Apr/2021 14:15:43 +0200 Olaf Meeuwissen via Dng wrote:
>> What I did
>> find somewhat weird is that it asked whether I wanted to keep all of the
>> xserver-xorg-video-* individually when I had already said `Y` to the
>> `task-desktop` package. With `apt-mark` I just marked
>> `task-xfce-desktop` as manual and didn't have to make up my mind about
>> all the video drivers.
>
> Yes, I tried it and it asks lots of useless questions.


After I sent my post, I wondered whether that might just be caused by
them being alternatives. So, I checked

olaf@quark:~$ dpkg-query -W -f '${Depends}\n' task-xfce-desktop
tasksel (= 3.54+devuan4), task-desktop, xfce4, slim | lightdm
olaf@quark:~$ dpkg-query -W -f '${Depends}\n' task-desktop
tasksel (= 3.54+devuan4), xorg, xserver-xorg-video-all, xserver-xorg-input-all, desktop-base
olaf@quark:~$ dpkg-query -W -f '${Depends}\n' xserver-xorg-video-all
xserver-xorg-video-amdgpu, xserver-xorg-video-ati, xserver-xorg-video-fbdev, xserver-xorg-video-nouveau, xserver-xorg-video-vesa, xserver-xorg-video-vmware

Nope, it's not an issue caused by alternatives. All those video drivers
are hard dependencies of task-desktop. Ho-hum! But those aren't the
ones debfoster asked me about ... :thinking:

Upon closer inspection, there are a few Recommended: video drivers I
have installed courtesy of task-xfce-desktop as well and those were also
not asked about. Then why is e.g. xserver-xorg-video-cirrus kept
installed as an automatic package by apt whereas debfoster asks me
whether I want it kept installed?

I think it has to do with all those video drivers having a

Provides: xorg-driver-video

and the xserver-xorg package listing

xserver-xorg-video-all | xorg-driver-video

in its Depends:.

So whereas apt appears to work "bottom-up", checking for a manually
installed package that has a dependency on each package (irrespective of
the fact that another package may already satisfy the dependency), it
looks like debfoster works "top-down" and remembers already satisfied
dependencies so it asks if you really want *multiple* dependency
satisfying alternatives installed. Makes sense from a parsimony point
of view and I think I like that. I've got this feeling that I may be
using a combination of apt-mark and debfoster in the future ... or
looking for options to make apt-mark take alternatives into account.

I should also make a note about checking out deborphan and cruft ...

> Once I told it to remove Evolution (since I use Thunderbird), and it went on
> asking whether I wanted to keep each evolution plugin.


Could it be that you have something else that depends on or recommends
something generic, say evolution-plugin, like I discovered for my Xorg
server's video (and input) drivers that triggered this behaviour?

I use neither Evolution nor Thunderbird so don't have a clue.

> Of a smart package, I'd have expected to look at what packages are configured
> for day to day usage. There are several ways to do so, starting from the
> alternatives system, perhaps Firefox's handlers, recently accessed executables,
> whatever. And how about packages downloaded and installed outside of the apt
> system (typically libreoffice, I'd guess)?


I try to stay away from those and if I really, really need them, they
end up below /usr/local/.

For my personal needs, I sometimes want the latest versions of docker-ce
(instead of docker.io) or Kubernetes related packages. These project's
run their own APT repositories, so I hook those in and apt-mark (and
debfoster for that matter) should be fine.

> What I really missed is a percent indicator. How many questions are there
> ahead? I terminated with 'q'. Possibly, the only package it helped to remove
> is debfoster itself.


You could have started out with `debfoster -q` :-)
Check the manual page. There appear to be quite a few options to help
one get started with a decent `keepers` file but it make take a few
iterations, just as I did using apt-mark. I guess there's no silver
bullet here either ;-)

Hope this helps,
--
Olaf Meeuwissen, LPIC-2            FSF Associate Member since 2004-01-27
 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
 Support Free Software                        https://my.fsf.org/donate
 Join the Free Software Foundation              https://my.fsf.org/join