From owner-freebsd-ports@FreeBSD.ORG Sat Feb 24 17:29:51 2007 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3D7E816A408 for ; Sat, 24 Feb 2007 17:29:51 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by mx1.freebsd.org (Postfix) with ESMTP id C2B3913C4D0 for ; Sat, 24 Feb 2007 17:29:48 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: by ug-out-1314.google.com with SMTP id 71so516455ugh for ; Sat, 24 Feb 2007 09:29:43 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:received:date:from:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to; b=tl4ofbgA2s+x4mzCOLJskHAMJpfU6Tkxw76YbzjhwoIdtNURG8jAb+AgOvQrihVJ1tSF2kC6sdgN5tKsoHliAjojf3c8Gpx7g4VlLoEpcvplmMBeQDPKegt3RJxm7oEDHjPo/aO+x4+2FZoiqVzHGA0uZA7Psk6kyQmI/q8+bJE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to; b=KcpAG5S9MKiPI/eJ1kN6VinuBAdSFM9YsnU30K0cJ8eyPCu8CLpI0LH2zgnFvUU7Sfir/VM3WvrU/6fCKsxwy7WBKUjjjOAzCVyMtWJMtuuUPgfYASbwpdv4QH1JqQ1YU1XVw6cdRbTMDsY26J+8ED8/TMmuc/Ht+tEK4wv7U9c= Received: by 10.67.26.7 with SMTP id d7mr3900593ugj.1172338183735; Sat, 24 Feb 2007 09:29:43 -0800 (PST) Received: from roadrunner.q.local ( [85.180.143.207]) by mx.google.com with ESMTP id l33sm2718071ugc.2007.02.24.09.29.42; Sat, 24 Feb 2007 09:29:43 -0800 (PST) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.13.8/8.13.8) with ESMTP id l1OFlEU9003235; Sat, 24 Feb 2007 16:47:14 +0100 (CET) (envelope-from uspoerlein@gmail.com) Received: (from q@localhost) by roadrunner.q.local (8.13.8/8.13.8/Submit) id l1OFl9te003234; Sat, 24 Feb 2007 16:47:09 +0100 (CET) (envelope-from uspoerlein@gmail.com) Date: Sat, 24 Feb 2007 16:47:09 +0100 From: Ulrich Spoerlein To: Fabian Keil Message-ID: <20070224154709.GA1556@roadrunner.q.local> Mail-Followup-To: Fabian Keil , ports@FreeBSD.org References: <20070222141301.007fee4f@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070222141301.007fee4f@localhost> Cc: ports@FreeBSD.org Subject: Re: Optionally depending on one of two ports (or none of them) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Feb 2007 17:29:51 -0000 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