create new tag
view all tags

How to use dumpdeps

LCFG users often have to solve problems involving dependencies. It can be useful to find out which files a machine uses, or which machines use a particular file. A tool called dumpdeps is handy for this job. It is installed on each LCFG server and it prints out the LCFG compiler's dependency information.

Sections: How to run it ; Quick answers ; Some examples

How to run it

dumpdeps is installed on LCFG servers in the directory /usr/lib/lcfg/server/utilities, so:
ssh lcfg.example.ed.ac.uk
/usr/lib/lcfg/server/utilities/dumpdeps > /tmp/dumpdeps-output
The output file can be quite large - dozens of megabytes on a well used LCFG service.

Quick answers

Which files is my machine using?
  • Run dumpdeps as described above.
  • Search through its output until you find the machine's name. The first occurence will simply say which release that machine is using. The second will have a complete list of the files used by that machine.

Which machines use this file?

  • Run dumpdeps as described above.
  • Search through the output backwards from the end of the file for the file name. It will be followed by a list of machines which are using that file.
  • Search again, because your file will be listed separately for each release (unless no machine uses that file in that release).

Does dumpdeps cover "stub" machines with no XML profiles?

  • Yes. It covers every host with any kind of LCFG source file.

Which types of file are listed?

  • Every type of file known to the LCFG compiler: .h header files, .def defaults files and .rpms package list files.

Some examples

The output of dumpdeps has three sections: Hosts and releases, Hosts and their files and Files and their hosts.

Hosts and releases

The output starts by listing every host known to the LCFG server, and the release used by that host. For example:
dependencies (/var/lcfg/conf/server/cache/DEPS.DB2.db) ..

angel has release level stable

apple has release level stable

aranygaluska has release level develop

babka has release level stable

ballokume has release level testing

basbousa has release level stable

Hosts and their files

The second section of dumpdeps output lists the hosts, and for each host it lists all of the files used by that host:
/var/lcfg/conf/server/data/profiles/cremeschnitte depends on ...
The file locations in the list are those used by the LCFG server. They may vary from one LCFG service to another.

Files and their hosts

Finally, the output lists each file, together with all of the hosts which use that file. There are two things to be wary of here. Firstly, files have separate entries for each release (develop, testing, stable). Secondly, a file is only listed if it is in used by at least one host. For example, core/include/lcfg/hw/pineapple_wonderbook.h from the example above might appear twice if it was used by machines on the develop and stable releases; but if it was not used by any machines on the testing release then there would not be an entry for the testing version of the file in this section:
/var/lcfg/conf/server/releases/develop/core/include/lcfg/hw/pineapple_wonderbook.h is used by ...
then later
/var/lcfg/conf/server/releases/stable/core/include/lcfg/hw/pineapple_wonderbook.h is used by ...

Addendum: how to search backwards

For emergencies: here's how to search backwards from the end of a file! In this example we search for the string php:
    Using emacs or xemacs   Using less, vim or vi
Open the file   emacs /tmp/mydump   less /tmp/mydump
Move to the end (bottom)   Esc >   G
Search backwards (upwards) for "php"   Ctl-r php   ?php (and press Return)
Find the next match   Ctl-r   ? (and press Return)
Move to the top (beginning) of the file   Esc <   g
Search normally for "php"   Ctl-s php   /php (and press Return)
Find the next match   Ctl-s   / (and press Return)
Topic revision: r2 - 2014-12-04 - cc
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback