YaST/Development/Devtools/gen logic deps

From openSUSE

Contents

About

This script gen_logic_deps has been created to graphically-represent the dependencies found by check_deps script.

You can find it in yast2-devtools RPM since version 2.16.2 or download it from here.

This tool produces very big dependency graphs, if you are interested only is some nodes of these graphs, see this extension.

Syntax

 /usr/share/YaST2/data/devtools/bin/gen_logic_deps [rpm_root [show_base]] > dot-in.txt
  • rpm_root - RPM dependencies can be queried from a different RPM-root, uses "/" as default.
  • show_base - Includes base yast2.rpm if set.

Limitations

You need to run the script in YaST sources directory.

Example

This example shows how to generate the current dependency-graph for openSUSE 10.3

 svn co http://svn.opensuse.org/svn/yast/branches/SuSE-Linux-10_3-Branch/
 cd SuSE-Linux-10_3-Branch
 /usr/share/YaST2/data/devtools/bin/gen_logic_deps > dot-in.txt
 dot -Tpng -oAll-deps.png dot-in.txt
 display All-deps.png

Here you can see part of the resulting image:

If you want to generate it for FACTORY, you'll have to use http://svn.opensuse.org/svn/yast/trunk/ and have installed the most recent YaST packages. On the other hand you could have those YaST packages installed in a separate root (Check `man root` --root). In that case, define rpm_root to point to that separate root.

This is an example of script debugging messages output:

 /usr/share/YaST2/data/devtools/bin/gen_logic_deps / base > dot-in.txt
 Working dir: '/yast/CODE11/SL_11.0/source'
 Root: /
 Checking dir: 'tv'
       Identified as: yast2-tv
       * RPM yast2-tv requires yast2
       * RPM yast2-tv requires yast2-sound
 Checking dir: 'vm'
       Identified as: yast2-vm
       * RPM yast2-vm requires yast2
 Checking dir: 'pam'
       Identified as: yast2-pam
       * RPM yast2-pam requires yast2
 Checking dir: 'x11'
       Identified as: yast2-x11
       * RPM yast2-x11 requires yast2
 Checking dir: 'slp'
       Identified as: yast2-slp
       * RPM yast2-slp requires yast2
 Checking dir: 'ntp-client'
       Identified as: yast2-ntp-client
       * RPM yast2-ntp-client requires yast2
       * RPM yast2-ntp-client requires yast2-packager
 Checking dir: 'dns-server'
       Identified as: yast2-dns-server
       * RPM yast2-dns-server requires yast2
       * RPM yast2-dns-server requires yast2-network
       * RPM yast2-dns-server requires yast2-ldap-client
 [...]

And example of the output:

 digraph "YaST RPM dependencies" {
       [...]
       "yast2-add-on (0)" -> "autoyast2-installation (5)" [ color="black" ]
       "yast2-add-on (0)" -> "yast2 (81)" [ color="black" ]
       "yast2-add-on (0)" -> "yast2-country (12)" [ color="black" ]
       "yast2-add-on (0)" -> "yast2-packager (15)" [ color="black" ]
       "yast2-add-on (0)" -> "yast2-storage (13)" [ color="black" ]
       "yast2-add-on-creator (0)" -> "yast2 (81)" [ color="black" ]
       "yast2-autofs (0)" -> "yast2 (81)" [ color="black" ]
       "yast2-autofs (0)" -> "yast2-ldap-client (9)" [ color="black" ]
       [...]
       "yast2-country (12)" -> "yast2 (81)" [ color="black" ]
       "yast2-country (12)" -> "yast2-bootloader (9)" [ color="black" ]
       "yast2-country (12)" -> "yast2-storage (13)" [ color="black" ]
       "yast2-country (12)" -> "yast2-x11 (1)" [ color="black" ]
       "yast2-debugger (0)" -> "yast2 (81)" [ color="black" ]
       "yast2-dhcp-server (0)" -> "yast2 (81)" [ color="black" ]
       [...]
 }

What the output actually means?

  • yast2-add-on requires autoyast2-installation
  • yast2-add-on requires yast2
  • ...
  • yast2-add-on is not required by any YaST package
  • autoyast2-installation is required by 5 YaST packages
  • yast2 is required by 81 YaST packages
  • ...