From owner-freebsd-ports@FreeBSD.ORG Mon May 4 01:36:46 2015 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2C41C39; Mon, 4 May 2015 01:36:46 +0000 (UTC) Received: from mail-lb0-x233.google.com (mail-lb0-x233.google.com [IPv6:2a00:1450:4010:c04::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 445401585; Mon, 4 May 2015 01:36:46 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2so95439141lbb.3; Sun, 03 May 2015 18:36:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=PCfxnxOIc19PXDbGZzPV7/x9QhWCETnAjAhEo0fWHoI=; b=Z6tR5SwyoTYBCuaz6o6LKJ7h0oMfdFp4Vp/7Kdxw/T8MUNd92fShH30i46LJnGcVKb 5wtDyJwaAmOLqvOLQrr9zVQAfwTzv1Z7vYfj2XaIm3bUVD6DNQq7w4awCHySHasVCWRh mvcckvZ88UcGT349w2EkcxM2A6YyUyP7+PuKMhd3KipMS+c9fr5Nq3iuooTlrWd/sPV9 7Rd6uOMicdlsbBnV3p+cWS/BDxvqlLdXBdADrdpooag+JsTWqvriLCvWEIOTsEzftCLS afWnt/zTgmCIgzxnBvKKnoLJzwbbQNoyhxcyjSnUycJJ8e9Xv9Yyc0nq0ZfhzZG3AP7X OwxQ== MIME-Version: 1.0 X-Received: by 10.112.199.1 with SMTP id jg1mr17768045lbc.59.1430703403555; Sun, 03 May 2015 18:36:43 -0700 (PDT) Received: by 10.152.137.193 with HTTP; Sun, 3 May 2015 18:36:43 -0700 (PDT) In-Reply-To: <5546B03B.9050604@heuristicsystems.com.au> References: <20150503043317.73FD0DAD@hub.freebsd.org> <44a8xlqv8x.fsf@lowell-desk.lan> <55469545.9000404@FreeBSD.org> <5546B03B.9050604@heuristicsystems.com.au> Date: Mon, 4 May 2015 04:36:43 +0300 Message-ID: Subject: Re: Broken _DEPENDS logic From: Kimmo Paasiala To: Dewayne Geraghty Cc: Matthew Seaman , freebsd-ports-local@be-well.ilk.org, freebsd-ports Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2015 01:36:46 -0000 On Mon, May 4, 2015 at 2:33 AM, Dewayne Geraghty wrote: > On 4/05/2015 7:38 AM, Matthew Seaman wrote: >> On 03/05/2015 21:08, Lowell Gilbert wrote: >>> But, generally, the answer to your question is "no," becuase it is often >>> the case that more than one port can serve as a dependency for another >>> port. Your suggestion amounts to saying that only one port can satisfy a >>> dependency for another port, which is not the case. >> You're correct as far as the ports goes, but not when you're dealing >> with precompiled packages. Once you've built the package, the >> dependency on the specific version of the other port is baked into it. >> That's something which is likely to change in the not too distant >> future, but it's going to mean some fundamental changes in the ports in >> order to bring about. >> >> At the moment, therefore, the advice for pkg users when you want to make >> customizations like eg. using a different version of postfix is to set >> up your onw instance of poudriere and build your own. >> >> Cheers, >> >> Matthew >> >> > I read Lowell's issue as indirectly suggesting an enhancement to the > packaging system. > > For the sake of the discussion, lets assume a dependency hierarchy of: X > depends upon Y. > While building X, rather than assume the prefix for Y, and test for the > existence of a file installed by Y (and this is very often used), use > pkg to ascertain the dependency's origin and lookup the prefix for Y, > prior to the test. > > And please can we not assume that everyone is using poudriere. > > Regards, Dewayne. It is quite weird that you have to test for the existence of a file to test for the existence of a dependency when the first thing that comes to mind would be to just ask pkg(8). This seems to be from the time when you couldn't assume that there is a package database that you could query for an installed package and its properties. Grep NO_PKG_REGISTER in /usr/ports/Mk to see how that was possible. -Kimmo