:: Re: [DNG] xdg-desktop-portal
Top Pagina
Delete this message
Reply to this message
Auteur: Olaf Meeuwissen
Datum:  
Aan: al3xu5
CC: dng
Onderwerp: Re: [DNG] xdg-desktop-portal
Hi,

al3xu5 via Dng <dng@???> writes:

> [[PGP Signed Part:Undecided]]
> Thu, 6 Jan 2022 22:48:16 +0100 - Antony Stone
> <Antony.Stone@???>:
>
>> On Thursday 06 January 2022 at 22:30:58, Ken Dibble wrote:
>>
>> > Why is xdg-desktop-portal in a fresh install of Chimaera?
>>
>> I have a Chimaera machine here, freshly installed, without any graphical
>> desktop environment - just a command-line network server - and
>> xdg-desktop- portal is not installed.
>>
>> > It can be safely uninstalled, as it no devuan packages in the base
>> > install require it,
>>
>> They may not REQUIRE it, but I wonder whether you are allowing packages
>> to install RECOMMENDS as well?
>>
>> Try "aptitude why xdg-desktop-portal" and see whether something you do
>> want to have on your machine has simply Recommended xdg-desktop-portal,
>> and you ended up with it because you haven't told apt or aptitude not to
>> do that sort of thing without your permission.
>>
>> I always put two files into /etc/apt/apt.conf.d before allowing much
>> software to be installed:
>>
>> /etc/apt/apt.conf.d/norecommendationsplease
>> APT::Install-Recommends "false";
>> APT::Get::Install-Recommends "false";
>>
>> /etc/apt/apt.conf.d/nosuggestionsplease
>> APT::Install-Suggests "false";
>> APT::Get::Install-Suggests "false";
>>
>> That way nothing gets installed unless I explicitly ask for it, or it's
>> essential for something I asked for.
>
> Hi
>
> Please can anyone suggest a way to list all the packages installed as
> recommended but without a real dependency?
>
> I would be curious to see how I have my system from this point of view ...


While I don't know of any such command, you can make apt-get tell you
what it would auto-remove if you treat automatically installed packages
as candidates for removal. That goes like this

  apt-get --assume-no \
      auto-remove -o APT::AutoRemove::RecommendsImportant=false


The --assume-no is there to make sure you don't shoot yourself in the
feet, both of them ;-)

A similar options exists for Suggests:

APT::AutoRemove::SuggestsImportant=false

Feel free to set both by using a second -o option.

These options will help getting rid of stuff that's already installed.
You make them the default by adding

APT::AutoRemove::RecommendsImportant "false";
APT::AutoRemove::SuggestsImportant "false";

to your /etc/apt/apt.conf (or in a snippet below /etc/apt/apt.conf.d/).

Please note that changing dependencies (courtesy of you applying some
upgrades to your system or just running an apt update for daedalus or
ceres) may make previously "required" packages no longer so. The
APT::AutoRemove::* options are there to clean up in that case.

To prevent such packages from getting installed in the first place you
can use the --no-install-recommends and --no-install-suggests options.
The latter is the default. To set them in your apt.conf

APT::Install-Recommends "false";
APT::Install-Suggests "false";

You may want to tell APT that any and all autoremovable packages should
be zapped ASAP with

APT::Get::AutomaticRemove "true";

This only triggers on installs and removals, not on upgrades :-/, but at
least you no longer need to run apt auto-remove manually yourself.

You can find this and other gems in the apt-get and apt.conf manual
pages. While the apt.conf settings are honoured by the apt as well as
apt-get commands, I am not sure apt will honour the same set of options.

Finally, the list of automatically and manually installed packages (as
well as those on hold) is maintained via the apt-mark utility. Looking
at its manual page just now I see some things I didn't know about. Off
checking those out ;-)

Hope this helps,
--
Olaf Meeuwissen                    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