From owner-freebsd-ports@FreeBSD.ORG Mon Nov 9 10:01:21 2009 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D339106568F; Mon, 9 Nov 2009 10:01:21 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-ew0-f218.google.com (mail-ew0-f218.google.com [209.85.219.218]) by mx1.freebsd.org (Postfix) with ESMTP id AD2518FC16; Mon, 9 Nov 2009 10:01:20 +0000 (UTC) Received: by ewy18 with SMTP id 18so216143ewy.43 for ; Mon, 09 Nov 2009 02:01:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=ZhznlEl/3AMt9eYeFemRys7rKRL21hdyNfKNgtB/vxg=; b=YuBLyUIn8lRzBDDgUlZp9xym01kv13NRuS7y/uqYhQn4g2zrQmcQprv/v985fnAJyf sVmu6RjhvWQNitTGfa5s1a5PrtxMb/QY5houweTgfH9QNISIOkkdlMqBZnq0w6DKM+Wx LAgEmDl1ywZkkTOaF/iFi583Ej/LbnBJoObao= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=d5Yl+6NvkwzQg6i6AznRr6BRvogn52HWtQ1XrZGtyw1rRjJFx59ihNFIkAy6mpkRqf 9MwcH4x/6e/mBp2GbR0EBF7moiNvli0PhJpIGz9Zax5/AfBDmsp31ELlkpWCLfh380dN 61ueUUEjNueOHPhXJBL8F4ce6PyPXRHAlDDhI= MIME-Version: 1.0 Received: by 10.216.86.132 with SMTP id w4mr2425258wee.87.1257760879517; Mon, 09 Nov 2009 02:01:19 -0800 (PST) In-Reply-To: <4AF7CBE1.70704@FreeBSD.org> References: <4AF7CBE1.70704@FreeBSD.org> Date: Mon, 9 Nov 2009 10:01:19 +0000 Message-ID: From: "b. f." To: Doug Barton Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-questions@freebsd.org, freebsd-ports@FreeBSD.org Subject: Re: math/py-numpy vs. math/atlas-devel 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: Mon, 09 Nov 2009 10:01:21 -0000 On 11/9/09, Doug Barton wrote: > First, sorry I missed the original problem report, I'm not subscribed > to -questions. Usually ports questions (including those about tools) > are handled on freebsd-ports@freebsd.org, but OTOH if you're not sure > where to send a question it's always better to start on the -questions > list. :) > > Second, thanks to b.f. for the very thorough analysis of the problem. > I will respond and trim a bit as I go. > > Third, I've cc'ed maho@ since the genesis of the problem is that > math/atlas and math/atlas-devel aren't setting CONFLICTS when > apparently they should be. maho, if you need any help with this let me > know. > > b. f. wrote: >> Scott Bennett wrote: >>> I would like to install science/gnudatalanguage but have been running >>> into various obstacles. Lars Engels very kindly just fixed one of them >>> (devel/lasi) (Thanks, Lars!), so now I'm on to the next one, which may >>> not >>> be a showstopper, but it's at least a nuisance. One of the >>> gnudatalanguage >>> dependencies is math/py-numpy, which, in turn, depends upon math/atlas. >>> However, I have math/atlas-devel installed and do not wish to revert to >>> an >>> older, slower version of the ATLAS library. Adding a "-x atlas-\*" onto >>> the portmaster command to build math/py-numpy fails to prevent portmaster >>>from trying to build math/atlas. > > As was pointed out, that definitely won't work. With the glob patterns > for exclusions, or specifying ports on the command line you want to be > as conservative as possible. Also, it's not necessary to include a * > at the end, portmaster will handle that for you. > >>> Creating a >>> /var/db/pkg/atlas-3.8.3_1,1/+IGNOREME file in addition doesn't help. > > +IGNOREME files are only relevant to installed ports. > >>> How >>> can I force math/py-numpy to accept the already installed >>> math/atlas-devel >>> libraries? >>> Thanks in advance for any help! > > The easiest way for you to accomplish this would have been to use '-x > atlas', the second-easiest would have been to use the -i command line > option. See the man page for more information on that. > >> Congratulations, you've managed to defeat three sets of safeguards in >> portmaster. >> >> Problem #1 >> >> math/atlas and math/atlas-devel don't have proper CONFLICTS entries in >> their Makefiles (this should be fixed), > > Yes, this analysis was essentially correct. > >> Problem #2: >> >> You're using the -x flag incorrectly. Or portmaster isn't >> implementing it properly when the port to be excluded is not actually >> installed, take your pick. > > The way that -x is implemented currently really depends on the user's > definition of the exclude pattern, and is designed to exclude things > as early as possible so as to avoid what would ultimately become > wasted effort. It's hard to justify modifying the code to guess that > something we've already started working on might match what we think > the user MEANT instead of what they SAID. > >> Problem #3: >> >> The +IGNOREME checks in portmaster aren't properly implemented for >> this case, so they fail to prevent math/atlas from being built. > > s/properly implemented for/designed to handle/ > > If you think about this for a second, the entries in /var/db/pkg are > exclusively related to installed ports, so trying to use an +IGNOREME > file for this purpose doesn't make sense, although I can sympathize > with the OPs sense of desperation here. :) > >> So what can you do while these problems are being fixed? > > Just to be clear, I didn't see anything that needs to be fixed in your > message, and I hope my explanation makes it clear why. If you think > that there are actual bugs that need to be fixed please feel free to > create a thread on -ports to discuss them. > The CONFLICTS for math/atlas* should be fixed, as you remarked. As for portmaster, I'll allow that your choices were reasonable, but it would be wise to note in the manpage that: 1) +IGNOREME files only work with installed ports (just because the package database is naturally associated with installed ports doesn't mean that someone won't create an +IGNOREME for one that isn't installed), and 2) when trying to prevent the build or installation of a port that is not currently installed, the exclusion glob will be compared with the port directory, rather than the PKGNAME, as is done for installed packages. Using something like: #!/bin/sh for _dir in `make -C /usr/ports -V SUBDIR` ; do for _dir2 in `make -C /usr/ports/${_dir} -V SUBDIR` ; do _pkgname=`make -C /usr/ports/${_dir}/${_dir2} -V PKGNAME` case "${_dir}/${_dir2}" in *${_pkgname%%-[0-9]*}*) ;; *) echo "${_dir}/${_dir2} ${_pkgname}" ;; esac ; done ; done one can find a number of ports that might surprise a user that was not aware of this fact. And with regard to the selection of exclusion globs, we should note that a glob that matches too many ports may be as problematic as one that matches too few. b.