Honing "Package Users" (Dependency Tracking)

Timothy Rice t.rice at ms.unimelb.edu.au
Sun Aug 8 00:41:09 PDT 2010

Hi everyone who is following this topic,

I was contemplating how to implement dependency tracking in the Package
User system and had an idea. Perhaps it would be of interest.

Part of the beauty of the Package Users system is that it depends only on
basic functionality that exists in every LFS system: users/groups,
permission bits, and bash scripting. It occurs to me that there is another
kind of functionality that also exists on every LFS system, and which
could be used to keep track of dependency information: symbolic links.

What I have in mind is that the package users' skel directory could
contain subdirectories called "depends" and "reverse-depends". These two
directories will be given to every new package, and they can be populated
with symlinks to the home directories of packages on which the current
package is (reverse) dependent.

The process of creating and destroying these symlinks can be automated.
Firstly, make sure each reverse-depends directory is an install-directory,
i.e. it belongs to the install group, is group-writable, and has the
sticky bit set. Then each package can make a symlink to itself in the
reverse-depends folder of other packages. This can be done as part of the
"build" script.

If you uninstall the package, you just follow the links in "depends" to
find all those places where the package needs to remove itself from
reverse-depends. If you have a script set up to handle uninstallation (cf
the "install_package" script), you could also have it issue a warning (or
fail completely) if the package's own reverse-depends is non-empty.

Opinions? Are there any obvious problems that I might have overlooked?



More information about the lfs-dev mailing list