rpmgraph:https://linux.die.net/man/8/rpmgraph 用法和功能,Fedora、CentOs、RedHat

rpmgraph:https://linux.die.net/man/8/rpmgraph 用法和功能,Fedora、CentOs、RedHat

问题:

我正在尝试让这个程序运行,我想制作系统上的依赖项和包的拓扑图/图rpm

rpm-devel-4.14.2-1.fc29.x86_64.rpm Fedora 29 下载 除其他外,给出:

/usr/bin/rpmgraph。 /usr/include/rpm/argv.h。 /usr/include/rpm/header.h。 /usr/include/rpm/rpmarchive.h。 /usr/include/rpm/rpmbase64.h。 /usr/include/rpm/rpmbuild.h。

https://linux.die.net/man/8/rpmgraph

rpmgraph PACKAGE_FILE

我试过这个:

rpm -qa > INSTALLED_PACKAGES
rpmgraph INSTALLED_PACKAGES

这用于填充PACKAGE_FILE

rpm -qa | sort | sed -e 's/\([^.]*\).*/\1/' -e 's/\(.*\)-.*/\1/' > PACKAGE_FILE

这仅适用于文件名,不含所有版本和体系结构编号。

仅使用文件名我会收到以下错误:

error: open of xfce4-screenshooter failed: No such file or directory
error: open of xfce4-screenshooter-plugin failed: No such file or directory
error: open of xfce4-session failed: No such file or directory
error: open of xfce4-session-engines failed: No such file or directory
error: open of xfce4-settings failed: No such file or directory
error: open of xfce4-taskmanager failed: No such file or directory
error: open of xfce4-terminal failed: No such file or directory
error: open of xfce-polkit failed: No such file or directory
error: open of xfconf failed: No such file or directory
error: open of xfdesktop failed: No such file or directory
error: open of xfsprogs failed: No such file or directory
error: open of xfwm4 failed: No such file or directory

对于前者我得到这个错误:

# rpmgraph INSTALLED_PACKAGES 
(null): read manifest failed:

所以我假设我需要包含包的列表+扩展名,.rpm就像大多数rpm用于处理包的工具一样,但它不起作用。

问题:

有谁知道是否可以使用此程序(rpmgraph)制作所有已安装软件包的地图/图表,以及如何制作?

另外,如果还有其他方法,请提供答案吗?

我正在 Fedora 30 上进行测试。

这个问题与此相关:如何对已安装的 rpm 软件包进行拓扑排序/523075#523075

编辑:

我从答案中尝试过:

rpmgraph | rpm --queryformat "%{name}-%{version}-%{release}.%{arch}.rpm\n" -qa > rpmgraph.dot

进而:

dot -Tps rpmgraph.dot -o rpmgraph.ps

但它给出了这些错误:

Warning: syntax ambiguity - badly delimited number '-20.f' in line 1794 of rpmgraph.dot splits into two tokens
Warning: syntax ambiguity - badly delimited number '-9.11.' in line 1795 of rpmgraph.dot splits into two tokens
Warning: syntax ambiguity - badly delimited number '-5.P' in line 1795 of rpmgraph.dot splits into two tokens
Warning: syntax ambiguity - badly delimited number '-2.12.' in line 1796 of rpmgraph.dot splits into two tokens
Warning: syntax ambiguity - badly delimited number '-2.f' in line 1796 of rpmgraph.dot splits into two tokens
Warning: syntax ambiguity - badly delimited number '-1.1.' in line 1797 of rpmgraph.dot splits into two tokens
Warning: syntax ambiguity - badly delimited number '-5.f' in line 1797 of rpmgraph.dot splits into two tokens
Warning: syntax ambiguity - badly delimited number '-0.8.' in line 1798 of rpmgraph.dot splits into two tokens

和:

# dotty rpmgraph.dot 
graph parser: syntax error near line 1
context:  >>> giflib <<< -5.1.9-1.fc30.x86_64.rpm
dotty.lefty: cannot load graph

答案1

要生成图表,您可以尝试点实用程序。

$ rpmgraph *.rpm > rpmgraph.dot
$ dot -Tps rpmgraph.dot -o rpmgraph.ps

相关内容