tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: p5-* modules and DEPEND for tests



> In order to keep dependencies short I would like to exclude all the
> DEPENDS for testing the modules, mabye we should make use of the options
> framework to activate them.


Concerns:
--------

Well, things might change over time, that's why I am "reopening" this
thread right now. I think I've updated about 60 perl modules so far and
being a Perl addict it really hurts to think about dependencies. We want
to keep the DEPENDS list short for the modules which is a decent
approach for pkgsrc I think.

Seeing it from the Perl perspective I see a few problems with this
approach. I can just update the perl modules, I can't tell anything
about their functions, how they work or if they are bugfree.
So from a maintainer perspective I need the tests by the authors of the
modules.

If a prerequired module A to build module B is not listed inside the
Makefile but is installed on the system, the tests for module B will
succeed. There is, once B is installed no dependency to module A being
listed. A removal of module A might break module B without any notice of
it. That might be problem for modules with a lot of dependencies.

I think we as maintainers can't look into all the Perl modules to see if
they are using the modules which are listed in the PREREQ_PM of the
Makefile.PL for testing purposes or if they are needed during runtime.

In order to keep pkgsrc clean and transparent for the users we should
include DEPENDS+= for all the modules which are listed inside the
Makefile.PL of a module.

To look into an example - here a section of the  Makefile.PL of
XML-Parser-RSS:

[...]
'PREREQ_PM'     => { XML::Elemental=>'2.0',
                     Class::XPath=>1.4,
                     Class::ErrorHandler=>0,
                     Test::More=>0 }
[...]

this would lead to the following DEPENDS inside pkgsrc


DEPENDS+=   p5-XML-Elemental>=2.0:../../textproc/p5-XML-Elemental
DEPENDS+=   p5-Class-XPath>=1.4:../../devel/p5-Class-XPath
DEPENDS+=   p5-Class-ErrorHandler-[0-9]*:../../devel/p5-Class-ErrorHandler

the Perl Module Test::More is part of the Perl distribution. Which could
be easily found out by running:

pkg_info -L perl | grep Test/More.pm



Conclusions about this:
----------------------

As the Perl interpreter looks into its @INC he'll find modules which
have been installed earlier and use them as well. In order to build
clean Perl modules we have to make sure that dependcies are listed
correctly and Perl Modules are build inside chroot environments which
are prepared just for this module. pkg_comp might be a good tool for
this I haven't looked very deep into this, I use chroots for my builds
and clean the sandbox after the build.



What I suggest:
--------------

So - enough for my explanations here, I really would like to see that
the DEPENDS section should list all the modules which are listed in the
PREREQ_PM section of the Makefile.PL from upstream to ensure the
integrity of pkgsrc for the Perl modules. I really would like to have a
decision on that I would like to write it down inside the pkgsrc guide
so everyone who will add Perl modules to the pkgsrc system can deal with
it.


Any suggestions?


- Uli

Attachment: pgp_EvPepMZMD.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index