Manually registering dependencies for ports

Stephen Montgomery-Smith stephen at missouri.edu
Mon Jun 7 00:16:30 UTC 2010


Thomas Rasmussen wrote:
> Hello,
>
> I've been wondering about something: When I write a script or webapp that
> needs some port to run, like a perl module, I install the needed port and
> life is good (tm). A year later when I've completely forgotten about the
> script I go do some spring-cleaning of the ports on the server, and I see
> some perl module that doesn't have any dependencies, and delete it. Fast
> forward a few days when I discover the script doesn't work anymore, cue
> face-palm, remove bullet from foot, etc.
>
> Is there some way I can register a dependency to prevent this ? Like
> adding a flag to an installed port to say "something outside of the ports
> system depends on this" along with a user specified comment string.

When you install a script - let's call it xxx - that depends upon port 
yyy, you could do something like

echo xxx >> /var/db/pkg/yyy/+REQUIRED_BY

I think this would work.


More information about the freebsd-ports mailing list