--- The problem ---

When a perl module is declared a variant, the .info file contains a line like this:

  Type: perl (5.8.0 5.8.1)

The following questions arise for new modules:

 * Which versions should I include in the list?
 * When should the list change?  And who should change them?

I assert that the former question is often answered by cargo cult: maintainers just copy the choices made by other maintainers. I did a quick test to see what choices people have made so far:

 % cd /sw/fink/10.3/unstable/main/finkinfo/libs/perlmods
 % egrep -rh 'Type: *perl *\(' . | sort -u
 % egrep -rh 'Type: *perl' . | sort -u
Type: perl
Type: perl (5.6.0 5.6.1 5.8.0 5.8.1 5.8.4 5.8.5)
Type: perl (5.6.0 5.6.1 5.8.0 5.8.1 5.8.4)
Type: perl (5.6.0 5.8.0 5.8.1 5.8.4)
Type: perl (5.6.0 5.8.0 5.8.1)
Type: perl (5.6.0 5.8.1)
Type: perl (5.8.0 5.8.1 5.8.4)
Type: perl (5.8.0 5.8.1)
Type: perl (5.8.1 5.8.4 5.8.6)
Type: perl (5.8.1 5.8.4)
Type: perl (5.8.1)
Type: perl 5.6.0
Type: perl 5.8.0
Type: perl 5.8.1
Type: perl(5.6.0 5.6.1 5.8.0 5.8.1 5.8.4 5.8.5)
Type: perl(5.6.0 5.8.0 5.8.1 5.8.4)
Type: perl(5.6.0)
Type: perl(5.6.1 5.8.0 5.8.1 5.8.4)
Type: perl(5.8.1)

Some of these are clearly out of date. For example, Fink doesn't even support Perl 5.8.5, and we don't support Perl 5.6.1 in 10.3 (at least there isn't a package for it that I can find). Most are missing 5.8.6, which is in unstable right now.

--- Proposed solution ---

I propose that we add a new percent expansion that looks like %{allperlversions} [I'm open to alternate suggestions] that expands to the list of all perl versions that Fink currently supports. This would let maintainers implicitly declare, "I expect that this module should work on any version of Perl". When new versions of Perl get added to Fink, no perlmods need to be updated. On the other hand, if a maintainer knows that a module only works for certain versions of Perl, that maintainer can set an explicit list just as we do now.

If this is deemed to be good idea, I'd be happy to write the patch.

--- Switchover process ---

A nice feature of this solution is that no existing package will break. Maintainers can switch over to using %{allperlversions} at their leisure.

--- Open questions ---

The major open question is how %{allperlversions} gets populated. Is it hardcoded into PkgVersion.pm? Or does Fink scan the package list for perl5xx-core and system-perl5xx at runtime?

Chris
--
Chris Dolan, Software Developer, www.chrisdolan.net
Public key: http://www.chrisdolan.net/public.key

Attachment: PGP.sig
Description: This is a digitally signed message part



Reply via email to