PROBLEM:
I'm trying to get this program running, I want to make a topological map/graph of the dependencies and packages on a rpm
system:
rpm-devel-4.14.2-1.fc29.x86_64.rpm Fedora 29 Download gives amongst other things:
/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
I've tried this:
rpm -qa > INSTALLED_PACKAGES
rpmgraph INSTALLED_PACKAGES
And this for populating PACKAGE_FILE
:
rpm -qa | sort | sed -e 's/\([^.]*\).*/\1/' -e 's/\(.*\)-.*/\1/' > PACKAGE_FILE
this one is for only filename without all the version and architecture numbers.
With only filename I get these errors:
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
and with the former I get this error:
# rpmgraph INSTALLED_PACKAGES
(null): read manifest failed:
So I was assuming I need the list with the package + the .rpm
extension like most rpm
tools use for working with the package, but it didn't work.
QUESTION:
Does anybody know if it's possible to make a map/graph like this of all installed packages with this program(rpmgraph
) and if it is how?
Also if there was another way, please provide an answer?
I'm testing on a Fedora 30.
This question is related to this:how-to-topologically-sort-installed-rpm-packages/523075#523075
EDIT:
I've tried this from the answer:
rpmgraph | rpm --queryformat "%{name}-%{version}-%{release}.%{arch}.rpm\n" -qa > rpmgraph.dot
and then:
dot -Tps rpmgraph.dot -o rpmgraph.ps
But it gives these errors:
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
And:
# 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
rpmgraph
software, is you have to use it on actualrpm
package files and does not work with just a list fromrpmdb
. To get a full dependency tree, you would runrpmgraph
on all therpm
packages in the Fedora repository or make sure to have a directory of all your installedrpm
packages that you could runrpmgraph
on. Therpmgraph
software does not output a visual graph, but outputsdot
directed graph format which can be parsed with thedotty
graph editor.