Keeping track of automatically installed dependency-only ports

Matthew Seaman m.seaman at
Sun Jul 8 07:38:12 UTC 2007

Hash: SHA256

Doug Barton wrote:

> Personally I think that portmaster's approach is the right one. If you
> accidentally delete something that it turns out you really do need,
> you can always install it again. On the other hand, the presence of an
> empty +REQUIRED_BY file is a very reliable indication that something
> was previously installed as a dependency, but is no longer needed.

How about having a special meta-port that depends on all packages
directly installed by the user:


or some such.  Because this will automatically add a field to
+REQUIRED_BY it should give the desired behaviour of blocking (or at
least warning about) deinstalling wanted packages for all of the
ports management tools I know of.

It will need some hackery to have the dependency list of the
meta-port updated whenever the end user (de)installs a port/package
by name or decides that a package previously installed as a
dependency is needed in its own right (or vice versa)  Perhaps
something like the way OPTIONS processing works, except it
dynamically generates a RUN_DEPENDS list, and it should use the same
sort of trick as ports-mgmt/vulnerability-test-port -- ie. use the
date as its version number -- to ensure it gets updated frequently.



- --
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP:     Ramsgate
                                                  Kent, CT11 9PW
Version: GnuPG v2.0.4 (FreeBSD)
Comment: Using GnuPG with Mozilla -


More information about the freebsd-ports mailing list