Inconsistent advice that is relevant to temporary configuration of DNF

Are --setopt=group_package_types=mandatory and --setop=install_weak_deps=False different? If so, how?

I have observed both utilized online, yet what they perform should be identical.

My understanding is that group_package_types only applies to the installation of groups and defines which parts of the group get installed.

install_weak_deps=False applies to package operations generally and ignores weak dependencies when installing and upgrading packages.


@dalto is correct. group_package_types only affects dnf groupinstall. Both of these options are documented in the dnf.conf(5) man page (man dnf.conf).


    List  of  the following: optional, default, mandatory. Tells dnf
    which  type  of  packages  in  groups  will  be  installed  when
    'groupinstall' is called. Default is: default, mandatory.


    When this option is set to True and a new package is about to be
    installed, all packages linked by weak dependency relation (Rec‐
    ommends  or  Supplements flags) with this package will be pulled
    into the transaction.  Default is True.

There’s actually also a third involved option, exclude_from_weak_autodetect, which at this point is admittedly starting to feel like overkill:


    If  enabled, dnf will autodetect unmet weak dependencies (recom‐
    mends or supplements)  of  packages  installed  on  the  system.
    Providers  of  these  weak dependencies will not be installed by
    dnf as weak dependencies any more (they will still be  installed
    if pulled in as a regular dependency). Defaults to true.