zypper - dependency graph
Yesterday, we needed with darix to obtain a dependency graph of the package you are about to install. I knew that something similar was planned in zypper, so I went to Jano Kupec to check the status of it.
Unfortunately, I learned that this feature is not implemented yet. I think it should not be very hard to enhance the zypper package list with some eye-candy, but I haven’t looked into it yet. I would love to have these outputs similar to Gentoo ones (colors and simple ASCII art dependency trees). Btw, zypper already has color support, so if you want to start hacking, there is source code in gitorious.
Jano also showed me a neat trick how to obtain the results we wanted anyway. If you are in similar situation, just follow these steps (they are of course not suitable for everyday use, but still better than nothing):
- install package
libzypp-testsuite-tools
- run
zypper install --debug-solver pkg
- cd into
/var/log/zypper.solverTestCase
- open
solver-test.xml
in your favorite editor - add
<graphic/>
tag just above the</trial>
closing tag - run
/usr/lib/zypp/testsuite/bin/deptestomatic.multi solver-test.xml
(as normal user, you won’t get any graph when running as root) - you can pan the graph, rotate it with the right click or even save it to disk!
The resulting image can be seen here: