0

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
  • What's with the downvote, I hate that, people downvoting but not leaving a comment to explain why. – somethingSomething Jun 7 at 9:48
  • 1
    From what I understand about the rpmgraph software, is you have to use it on actual rpm package files and does not work with just a list from rpmdb. To get a full dependency tree, you would run rpmgraph on all the rpm packages in the Fedora repository or make sure to have a directory of all your installed rpm packages that you could run rpmgraph on. The rpmgraph software does not output a visual graph, but outputs dot directed graph format which can be parsed with the dotty graph editor. – GracefulRestart Jun 7 at 18:24
  • @GracefulRestart that is actually helpful finally some sense, why did I get a downvote, ?? – somethingSomething Jun 7 at 18:40
  • I have no idea why you got a downvote, it was there when I got here. – GracefulRestart Jun 7 at 18:48
-1

To generate graph you can try dot utility.

$ rpmgraph *.rpm > rpmgraph.dot
$ dot -Tps rpmgraph.dot -o rpmgraph.ps
  • Can you elaborate, I can't get a graph from the commands you provided, can you be more specific, thanks – somethingSomething Jun 7 at 10:03
  • 1
    rpmgraph output will be in dot directed graph format, and can be displayed or printed using the dotty graph editor from the graphviz package, linux.die.net/man/1/dot – asktyagi Jun 7 at 10:06
  • -1 I can't get this to work and I can't find any dotty graph editor in the link you provided – somethingSomething Jun 7 at 10:14
  • 1
    I thought you asked for explanation only you can download it from here graphviz.gitlab.io/download – asktyagi Jun 7 at 10:19

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.