Port dependencies on p5-Test-*

Yen-Ming Lee leeym at leeym.com
Wed Feb 27 16:59:37 UTC 2008


2008/2/27, Dag-Erling Smørgrav <des at des.no>:
> > And I guess that you prefer to keep RUN_DEPENDS simple, and even
>  > ignore BUILD_DEPENDS at all. The users will get some warning messages
>  > for missing dependencies but it builds anyway. However, It means that
>  > the port maintainers need to somehow find out that which dependencies
>  > are really needed based on the modules installed, not the
>  > not-really-useful Makefile.PL or Build.PL, since the module authors
>  > may put everything there no matter they are really needed or needed
>  > for tests.
>
> Thank you for showing that you neither understand the issue nor have any
>  interest in fixing it.
>
>  DES
>

I don't know why you attacked me several times like that. I describe
my viewpoints, also I said that I was convinced, and just want to make
sure that what you want.

PERL_DEPENDS and PERL_TEST_DEPENDS are useful, they can help skip the
dual-life modules since we will check if they are in core and finally
translate the missing ones into BUILD_DEPENDS and RUN_DEPENDS in
bsd.perl.mk.

However, if your main purpose is to keep dependency simple and to
avoid "building a bunch ports we don't need", including the ones
needed for tests, the problem I described do happen.

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.

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.

You can keep attacking me, but image about what will you do if you are
the p5-* ports maintainer.

-- 
Yen-Ming Lee <leeym at leeym.com>


More information about the freebsd-ports mailing list