From owner-freebsd-ports@FreeBSD.ORG Wed Feb 27 20:59:34 2008 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40657106566C for ; Wed, 27 Feb 2008 20:59:34 +0000 (UTC) (envelope-from leeym@leeym.com) Received: from hs-out-0708.google.com (hs-out-0708.google.com [64.233.178.244]) by mx1.freebsd.org (Postfix) with ESMTP id E780C8FC30 for ; Wed, 27 Feb 2008 20:59:33 +0000 (UTC) (envelope-from leeym@leeym.com) Received: by hs-out-0708.google.com with SMTP id h53so2300823hsh.11 for ; Wed, 27 Feb 2008 12:59:33 -0800 (PST) Received: by 10.100.254.18 with SMTP id b18mr7324877ani.70.1204145973018; Wed, 27 Feb 2008 12:59:33 -0800 (PST) Received: by 10.100.172.11 with HTTP; Wed, 27 Feb 2008 12:59:32 -0800 (PST) Message-ID: <759236930802271259o5bc025d5s5117987ab54e2c77@mail.gmail.com> Date: Wed, 27 Feb 2008 12:59:32 -0800 From: "Yen-Ming Lee" To: "Anton Berezin" In-Reply-To: <759236930802270859y2d5014ccvc01caa3b043ff429@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <86zltpzrxt.fsf@ds4.des.no> <759236930802242324o614598d1i1a8ca3cc8c12478c@mail.gmail.com> <86prulibf4.fsf@ds4.des.no> <759236930802250245j646f5be5k8382bedbfb2a7c1e@mail.gmail.com> <868x19i6ky.fsf@ds4.des.no> <759236930802251702h694c4f5bn2c7c87c7c47c7cc@mail.gmail.com> <86zltnsxap.fsf@ds4.des.no> <759236930802261046h216da59fv2bfdd616f601c325@mail.gmail.com> <86ablmr94j.fsf@ds4.des.no> <759236930802270859y2d5014ccvc01caa3b043ff429@mail.gmail.com> Cc: ports@freebsd.org, perl@freebsd.org Subject: Re: Port dependencies on p5-Test-* 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: Wed, 27 Feb 2008 20:59:34 -0000 Sorry to quote a lot from my previous mail. I had one wrong statement so I have to repeat the example to correct it. 2008/2/27, Yen-Ming Lee : > For example, module A said it needs module B, C, D, E in Makefile, > among them, B, C are needed for run and D, E are needed for tests. > Also B and D are in core already, so the only module needed is C. > Makefile.PL will looks like this (comments are added to explain the > problem details, module authors may not do so): > > use ExtUtils::MakeMaker; > WriteMakefile > ( > 'NAME' => 'A', > 'VERSION_FROM' => 'A.pm', > 'PREREQ_PM' => { > 'B' => '0.3', # for run, in core > 'C' => '0', # for run, not in core > 'D' => '0', # for test, in core > 'E' => '0.5' # for test, not in core > } > ); > > So the port maintainer should put the following knobs in port Makefile > > PERL_DEPENDS= \ > www/p5-B>=0.3 \ > devel/p5-C>=0 > > PERL_TEST_DEPENDS= \ > textproc/p5-D \ > devel/p5-E>=0.5 > > In this case, how can a port maintainer figure out that which ones > should be in PERL_DEPENDS and which ones should be in > PERL_TEST_DEPENDS based on the module's Makefile? so... two scenarios > > - the port maintainer put everything in PERL_DEPENDS, bsd.perl.mk > figures our that B, D are in core so put C, E in BUILD_DEPENDS and > RUN_DEPENSD, so we will still build the ports we don't need, in this > case they are E and its dependencies. > > - the port maintainer responsibly scan all modules installed and put > B, C, D in PERL_DEPENDS and E in PERL_TEST_DEPENDS, so we can skip the > one(s) needed for tests. My bad. It should be B, C in PERL_DEPENDS and D, E in PERL_TEST_DEPENDS. > Since you want to avoid "building a bunch ports we don't need" and > prefer the latter scenario, port maintainers need to scan the modules > entirely to figure out which ones are really needed. Also users will > get some warning messages for the missing dependencies (the ones for > tests) during the build though it build anyway. > Let me pick a vivid example, www/p5-Jifty, which is maintained by tobez@. Sorry, tobez@, I'm not against you, just want to make sure that you want us (p5-* port maintainers) to do so. I really have no problem if you want it, but I hope that other p5-* port maintainers will follow the same way. p5-Jifty has 76 dependencies directly and 207 dependencies totally. Now all of the direct dependencies are in BUILD_DEPENDS and RUN_DEPENDS=BUILD_DEPENDS. It's the worst cases described by des@ in the first mail of this thread. The module authors just put everything in Makefile.PL, so you have to scan all the modules installed. Some of the dependencies are for run, we really need them and should put them in PERL_DEPENDS, then bsd.perl.mk will check their versions with the ones in cores, and put the missing ones in BUILD_DEPENDS and RUN_DEPENDS; some of the dependencies are for tests only, we should put them in PERL_TEST_DEPENDS so only the developers with P5PORTER set will bring them into the check process and put them in BUILD_DEPENDS if needed. All the others are rescued from hell and will happily build the port without them. Here comes the problem: please tell us how to figure out which ones should be in PERL_DEPENDS and which ones should be in PERL_TEST_DEPENDS. I, a lame p5-* ports maintainer, spent more than two hours to write the script, scan and test again and again, and finally found that five of them are only needed for tests. Be careful, not the five ones starting with Test::*. Furthermore, only three out of the five ones are in Makefile now, which means we don't cover all modules needed for tests yet. I think you must have some easier way to scan the dependencies. Thanks and regards, -- Yen-Ming Lee