Slackdeptrack v0.1.3 --- Slackware dependencies tracking utility
(w)by Pawel Stolowski <pawel.stolowski@wp.pl>
Released under terms of GNU General Public License

Homepage: http://linux.bydg.org/~yogin

1. Preface
----------

We all love Slackware approach to packages: simple package format and no
dependency hell if you know what you're doing. It is however sometimes
useful to know some package dependency before issuing removepkg. That's
why I wrote this utility: it gives you a brief summary of most important
package dependencies. Slackdeptrack creates plain text, html, xml and
dot (graphviz) output with package dependencies.

2. How does it work
-------------------

Slackdeptrack parses /var/log/packages files, finds executable files and
libraries for all packages, then calculates dependencies using 'readelf'
command. Slackdeptrack uses cache files for faster operation: first time
you run slackdeptrack, it takes a while to examine everyting (1m18s on
Athlon XP 1700+ with 305 packages installed); next time it will run much
faster (~2s). Cached results are kept in /var/cache/slackdeptrack
directory by default.

3. Installing
-------------
Just copy slackdeptrack to a directory in your PATH, for example to /usr/sbin
and slackdeptrack.8 manpage to /usr/man/man8 (or elsewhere in your MANPATH).
Create /var/cache/slackdeptrack directory. If you want to run slackdeptrack as
regular user (not recommended), make it readable and writable for that user.
That's all.

4. Usage
--------

It is recommended to run slackdeptrack as root, because some binary files (like
/bin/ping) are readable only for root and their dependencies couldn't be
calculated.

Use '-h' to get available options:

slackdeptrack 0.1.3
(w)by Pawel Stolowski <pawel.stolowski@wp.pl>

Usage: slackdeptrack [-s] | [[-t file | -x file | -d file | -p file] [-a] [-l]] [-c dir] [package ...]
Options:
   -t file      create html file
   -x file      create xml file
   -d file      create dot file for graphviz graph
   -p file      create text file
   -a           create links in html output
   -l           use full package names in output
   -s           sweep cache
   -c dir       use this cache directory instead of default
   -h           this help

You can give optional package names to be included in output. You must use
short package names, like vim, perl, python, alsa-lib. By default,
slackdeptrack shows dependencies for all packages.

For now, slackdeptrack can create three output formats: plain text file,
xml file and html file. Each file lists all installed packages with
their dependencies. Example usage (xml output):

slackdeptrack -x test.xml

The 'sweep cache' option removes obsolete cache entries for removed
packages. These entries don't interfere with slackdeptrack operations
(they don't cause extra calculations nor false dependencies), but just
occupy disk space. You should sweep cache from time to time if you
removed any packages, just to save space.

See example/ subdirectory for example output. See man page for usage details
and more examples.

5. Limitations
--------------

Slackdeptrack is not perfect. If your package depends on libraries not
listed in /var/log/packages (e.g. installed with make; make install), it
will not detect dependency. Runtime dependencies (e.g. some command
invokes another) are not detected. Broken dependencies (some command
requires library which doesn't exists one the system) are not currently
handled too.

Graphiviz dot file output is not currently very useful: you may use
resulting file to create package dependency graph, but for now it is too
bloated to be useful; prepare for hardly readable 400k postscript file
which takes ages to view even on fast PC... Any ideas on how to make
this kind of output readable and useful are welcome.

Update: starting from version 0.1.1 you may specify packages to include
in dependencies output, so you may get readable graph.

Keep in mind that slackdeptrack is beta software. It may not detect some
dependency correctly. I'll however try to improve accuracy in next
versions.

