如何列出 dnf 的弱依赖关系?

如何列出 dnf 的弱依赖关系?

例如,如果我启动希腊语言元包的安装,系统会提示我安装其依赖项和弱依赖项。

$ 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]:

但是,如果我尝试手动列出依赖项,我看不到弱依赖项。我如何查找它们?

这是我尝试过的。

$ 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

根据手册页:

dnf [选项] repoquery [<选择选项>] [<查询选项>] [<包文件规范>]

在可用的 DNF 存储库中搜索选定的软件包并显示所需的有关它们的信息。它相当于转速-q对于远程存储库。

- 依靠

显示包所依赖、增强、推荐、建议或补充的功能。

答案1

dnf repoquery --depends仅打印前向依赖项(langpacks-el包中列出的依赖项为要求/推荐/建议)所以它在这里按预期工作,因为“额外”包是通过引入的向后/反向依赖hunspell-el例如,该包具有反向弱依赖关系(此依赖关系列hunspell-el补充剂)表示当您同时安装和(hunspell and langpacks-el)时将会安装它。对于语言包,这允许仅安装已安装的包的语言包 -如果您还没有 KDE,您将无法获得 KDE 本地化(也是补充)。hunspelllangpack-elkde-l10n-ellangpacks-el

您可以打印反向弱依赖关系--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

我认为不可能用一个命令同时打印前向和后向依赖关系。

相关内容