tech-pkg archive

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

Re: Perl5 update



On Wed, Jun 04, 2014 at 11:12:40PM +0200, Edgar Fuß wrote:
> 1. Currently, when I pkgsrc a Perl Distribution, I have to manually 
>    go through all the required modules and find out since which release 
>    of Perl they have been in Core. Then, for every module in Core, 
>    I have to include a line
>       DEPENDS+= {perl>=5.nn,p5-Foo-Bar>=1.23}:../../devel/p5-Foo-Bar
>    or
>       DEPENDS+= p5-Foo-Bar>=1.23:../../devel/p5-Foo-Bar
>    in the Makefile. I nail down the result of my research given what 
>    I know about Perl releases up to now.
> 2. When a new release of Perl adds/removes modules to/from Core, someone 
>    has to re-visit all the Makefiles and go through the same dance again.
> (3. I prefer to express what I mean, not something that amounts to the same 
>  thing under current circumstances.)
> 
> If I was allowed to replace the above with something like
>       PERL_MODULE_DEPENDS+= Foo::Bar>=1.23;devel/p5-Foo-Bar
> (I would like to point out there's a pkrsrc package name "devel/p5-Foo-Bar" 
> in that line) then a computer can make these decisions.
> Not only are computers better at making bulk decisions, it also allows 
> to automatically re-make that decision for every Perl release to come.

I think this would work in principle. However, there's also the
implementation step. Since it's a major change for perl in pkgsrc, I'd
like to see a working change for a simple example, then we could think
about how to increase the coverage to all perl modules.

From what I see right now, we'd need at least

* a file in mk, e.g. perl-module-mappings.mk (name pulled out of hat,
  bring your own hat) mapping either

  * all modules ever included in perl to pkgsrc paths, or, probably
    better,

  * all perl modules to pkgsrc paths

* a file containing the current state of what perl provides itself

* a script that updates this file based on corelist output

* some dependency logic that reads these files to decide if pulling in
  perl is enough or if a different pkgsrc package is needed

* some way to semiautomatically add lines to perl-module-mappings.mk
  when a new perl package is added to pkgsrc


Reading this list, I'm not sure it's really worth the effort or even
an improvement to what we have now, but I'm willing to be surprised by
your design and patch :)
 Thomas


Home | Main Index | Thread Index | Old Index