Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Feb 2007 16:47:09 +0100
From:      Ulrich Spoerlein <uspoerlein@gmail.com>
To:        Fabian Keil <freebsd-listen@fabiankeil.de>
Cc:        ports@FreeBSD.org
Subject:   Re: Optionally depending on one of two ports (or none of them)
Message-ID:  <20070224154709.GA1556@roadrunner.q.local>
In-Reply-To: <20070222141301.007fee4f@localhost>
References:  <20070222141301.007fee4f@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
Fabian Keil wrote:
> I maintain the ports security/dns-proxy-tor and
> security/trans-proxy-tor which both require a Tor
> control port being available somewhere to do their job.
> 
> They can work with both Tor versions in the ports collection
> (security/tor and security/tor-devel), and I originally wanted
> to register a dependency on the one that is already installed,
> or use tor-devel if no version is installed.
> 
> To do that I added the RUN_DEPENDS line:
> 
> ${LOCALBASE}/bin/tor:${PORTSDIR}/security/tor-devel
> 
> which mostly works as expected, but fails if the tor
> port is installed, in which case a dependency on tor-devel
> is registered.
> 
> I'm aware that my RUN_DEPENDS line is incorrect,
> but I'm unaware of a better way.

This is a bug in the ports framework. It wrongfully assumes, that an
installed binary X is/was provided by port Y if you specify X:Y.

What it _should_ do is check for binary X, if present use pkg_info -W to
get the right port. If not present, use Y as a default port to pull in
this binary.

The same thing happens, if you e.g. install lynx-ssl and some other port
depends on lynx (the binary!) then a dependancy on lynx (the port) will
be recorded, not on lynx-ssl.

It is trivial to fix, iff you assume that the user only installs
software via ports and all the databases are consistent.

Ulrich Spoerlein



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070224154709.GA1556>