4

For example, if I initiate installation of the Greek language meta-package, I am prompted to install its dependencies and weak dependencies.

$ LC_ALL=C sudo dnf install langpacks-el
[sudo] password for roman: 
Last metadata expiration check: 4:03:14 ago on Sat Sep 25 13:17:49 2021.
Dependencies resolved.
===============================================================================
 Package                    Arch      Version                 Repository  Size
===============================================================================
Installing:
 langpacks-el               noarch    3.0-14.fc34             fedora      10 k
Installing dependencies:
 autocorr-el                noarch    1:7.1.6.2-1.fc34        updates     81 k
 langpacks-core-el          noarch    3.0-14.fc34             fedora      10 k
 langpacks-core-font-el     noarch    3.0-14.fc34             fedora      10 k
Installing weak dependencies:
 glibc-langpack-el          x86_64    2.33-20.fc34            updates    512 k
 hunspell-el                noarch    1:0.9-7.fc34            fedora     1.7 M
 hyphen-el                  noarch    0.20051018-23.fc34      fedora     9.3 k
 libreoffice-help-el        x86_64    1:7.1.6.2-1.fc34        updates    3.6 M
 libreoffice-langpack-el    x86_64    1:7.1.6.2-1.fc34        updates    854 k
 mythes-el                  noarch    0.20070412-25.fc34      fedora     161 k

Transaction Summary
===============================================================================
Install  10 Packages

Total download size: 6.9 M
Installed size: 56 M
Is this ok [y/N]:

However, if I try manually listing the dependencies, I don't see the weak dependencies. How can I look them up?

Here is what I tried.

$ LC_ALL=C dnf repoquery --depends langpacks-el
Last metadata expiration check: 3:15:20 ago on Sat Sep 25 14:07:02 2021.
langpacks-core-el
$ LC_ALL=C dnf repoquery --depends langpacks-core-el
Last metadata expiration check: 3:15:42 ago on Sat Sep 25 14:07:02 2021.
langpacks-core-font-el
$ LC_ALL=C dnf repoquery --depends langpacks-core-font-el
Last metadata expiration check: 3:16:08 ago on Sat Sep 25 14:07:02 2021.
dejavu-sans-fonts

According to the manpage:

dnf [options] repoquery [<select-options>] [<query-options>] [<package-file-spec>]

Searches available DNF repositories for selected packages and displays the requested information about them. It is an equivalent of rpm -q for remote repositories.

--depends

Display capabilities that the package depends on, enhances, recommends, suggests or supplements.

0

1 Answer 1

5

dnf repoquery --depends prints only forward dependencies (dependencies listed in the langpacks-el package as Requires/Recommends/Suggests) so it works here as expected because the "extra" packages are brought in via backward/reverse dependencies. The hunspell-el package for example has reverse weak dependency (this dependency is listed in hunspell-el as Supplements) on (hunspell and langpacks-el) meaning it will be installed when you have both hunspell and langpack-el installed. With language packages this allows to install only language packages for packages that are already installed -- you won't get KDE localization (kde-l10n-el also supplements langpacks-el) if you already don't have KDE.

You can print the reverse weak dependencies with --whatsupplements

# dnf repoquery --whatsupplements langpacks-core-el
glibc-langpack-el-0:2.33-20.fc34.x86_64
glibc-langpack-el-0:2.33-5.fc34.x86_64

# dnf repoquery --whatsupplements langpacks-el
gimp-help-el-0:2.10.0-6.fc34.noarch
guayadeque-langpack-el-0:0.4.7-0.27.20210315git37840c1.fc34.noarch
guayadeque-langpack-el-0:0.4.7-0.30.20210415git79ec09d.fc34.noarch
hunspell-el-1:0.9-7.fc34.noarch
hyphen-el-0:0.20051018-23.fc34.noarch
kde-l10n-el-0:17.08.3-10.fc34.noarch
libreoffice-langpack-el-1:7.1.2.2-1.fc34.x86_64
libreoffice-langpack-el-1:7.1.6.2-1.fc34.x86_64
mythes-el-0:0.20070412-25.fc34.noarch
shotcut-langpack-el-0:21.03.21-2.fc34.noarch
tesseract-langpack-ell-0:4.1.0-1.fc34.noarch

I don't think it's possible to print both forward and backward dependencies with one command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.