From owner-freebsd-perl@FreeBSD.ORG Tue Feb 26 16:16:36 2008 Return-Path: Delivered-To: perl@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C14FB1065673; Tue, 26 Feb 2008 16:16:36 +0000 (UTC) (envelope-from tobez@tobez.org) Received: from heechee.tobez.org (heechee.tobez.org [194.255.56.42]) by mx1.freebsd.org (Postfix) with ESMTP id 5A80513C447; Tue, 26 Feb 2008 16:16:36 +0000 (UTC) (envelope-from tobez@tobez.org) Received: by heechee.tobez.org (Postfix, from userid 1001) id 870EC6D402; Tue, 26 Feb 2008 17:16:35 +0100 (CET) Date: Tue, 26 Feb 2008 17:16:35 +0100 From: Anton Berezin To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20080226161635.GE30778@heechee.tobez.org> Mail-Followup-To: Anton Berezin , Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , ports@freebsd.org, perl@freebsd.org, Yen-Ming Lee , lth@freebsd.org References: <86prulibf4.fsf@ds4.des.no> <759236930802250245j646f5be5k8382bedbfb2a7c1e@mail.gmail.com> <868x19i6ky.fsf@ds4.des.no> <759236930802251702h694c4f5bn2c7c87c7c47c7cc@mail.gmail.com> <20080226122512.GA30778@heechee.tobez.org> <86ve4bsx8l.fsf@ds4.des.no> <20080226140456.GB30778@heechee.tobez.org> <867igrst0g.fsf@ds4.des.no> <20080226144203.GC30778@heechee.tobez.org> <86mypnrary.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86mypnrary.fsf@ds4.des.no> X-Powered-By: FreeBSD http://www.freebsd.org/ User-Agent: Mutt/1.5.17 (2007-11-01) Cc: ports@freebsd.org, perl@freebsd.org, lth@freebsd.org, Yen-Ming Lee Subject: Re: Port dependencies on p5-Test-* X-BeenThere: freebsd-perl@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: maintainer of a number of perl-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2008 16:16:37 -0000 On Tue, Feb 26, 2008 at 04:35:13PM +0100, Dag-Erling Smrgrav wrote: > Anton Berezin writes: > > Dag-Erling Smørgrav writes: > > > Why? If perl isn't installed, build that first. > > > If perl is installed, use 'perl -M$MODULE -e "1;"' to check whether the > > > module exists, or if a certain version is required, 'perl -e "use $MODULE > > > $VERSION;"' > > > > I think it is a bad idea, because > > > > - you need the "build that first" part (currently we create the complete > > list of direct dependencies before actually building anything; too many > > things to change with regard to our current procedure if we get rid of > > this constraint); > > The rest of the ports tree checks every dependency right before building > it; I don't see why Perl ports should be any different. Er, I am not sure we understood each other here. What I was trying to say was this. Let's suppose we do not have perl installed. Let's suppose the user wants to build port A which depends on perl and on a module B which is both in perl's core and in a port B. Then the list of direct dependencies for port A will either include port B or not, depending on the version consideration. If we accomodate your suggestion, we cannot decide whether port B will be a dependency or not until we built and installed perl. I did not look in bsd.port.mk specifically to compose this mail, but my recollection is that it is not how this currently works. > > - we introduce modules into the equation when before we had only ports and > > packages to worry about; > > Why? I don't see what the difference is between "check if gcc34 exists, > otherwise install lang/gcc34" and "check if Test::Unit exists, otherwise > install devel/p5-Test-Unit". > > Or would you say that dependency tests on binaries "introduce binaries > into the equation when before we had only ports and packages to worry > about"? Not really. What I don't like is that we still have to deal with ports (for building stuff) and packages (for recording dependencies), and dealing in addition to that with modules does not help us much with the first two. For example, when you do "perl -MX -e 'print $X::VERSION'", you get back a version which is OK. Now what? Now you *still* need to test whether p5-X is in fact installed, because if it is and you do not record it as a dependency you are in trouble, since the user can without any complaints pkg_delete p5-X and break your port. And if it is not installed then you are going to assume that it must be in the core perl since it is there, and you could be wrong on that, too (if the user just installed it from CPAN). So I do not see how doing a version check on the module will reduce the amount of work we need to do on the ports/packages side of the equation. Of course it is possible to do this check correctly, it just that I am not sure it is worth the trouble. > > - "use $MODULE" might have unanticipated side effects since a bunch of > > preamble code is executed [this is not a security risk as such (a > > malicious port can do worse things already), but as a general principle I > > don't like that]; > > OK, most of these ports define their dependencies in Makefile.PL. Guess > how ExtUtils::MakeMaker checks for dependencies... Alright, I sort of drop this objection, except that then we do the loading part twice (the time consideration part of my previous mail). \Anton. -- We're going for 'working' here. 'clean' is for people with skills... -- Flemming Jacobsen