Port dependencies on p5-Test-*

Yen-Ming Lee leeym at leeym.com
Wed Feb 27 20:59:34 UTC 2008


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 <leeym at leeym.com>:
>  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 at .
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 <leeym at leeym.com>


More information about the freebsd-perl mailing list