Date: Mon, 9 Nov 2009 10:01:19 +0000 From: "b. f." <bf1783@googlemail.com> To: Doug Barton <dougb@freebsd.org> Cc: freebsd-questions@freebsd.org, freebsd-ports@FreeBSD.org Subject: Re: math/py-numpy vs. math/atlas-devel Message-ID: <d873d5be0911090201l4bf2f526i391edbad27838393@mail.gmail.com> In-Reply-To: <4AF7CBE1.70704@FreeBSD.org> References: <d873d5be0911082256y5c35d288i13b40f8d6e1f6285@mail.gmail.com> <4AF7CBE1.70704@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11/9/09, Doug Barton <dougb@freebsd.org> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d873d5be0911090201l4bf2f526i391edbad27838393>