Project:Perl/maint-notes/virtual/perl-Module-CoreList

From Gentoo Wiki
Jump to:navigation Jump to:search


Versioning Headaches around Major Perl releases

This package is tricky versionwise for the following reasons:

  1. It is shipped with perl itself
  2. It is dual lifed ( shipped on CPAN as well as in Perl itself )
  3. Packages can require a specific version of it
  4. Its versions are date based
  5. Perl ships maintenance releases

This means this happens ( pretend the number is a month/year )

  1. Perl 5.24.0 releases ( Module::CoreList version = 0.1 )
  2. Perl 5.24.1 releases ( Module::CoreList version = 0.2 )
  3. Perl 5.26.0 releases ( Module::CoreList version = 0.3 )
  4. Perl 5.24.2 releases ( Module::CoreList version = 0.4 )

Which means if you were to have

   virtual/perl-Module-CoreList-0.2  -> perl 5.24.1
   virtual/perl-Module-CoreList-0.3  -> perl 5.26.0
   virtual/perl-Module-CoreList-0.4  -> perl 5.24.2

Then people who had Perl 5.26 would then get prompted to downgrade for a newer Module::CoreList

Which we can't do.

Now the issue gets more complicated, as the versions that ship with Perl itself might have patch suffixes which are higher than the effective equivalent that gets released as dual life.

So it looks more like this:

  1. Perl 5.22.0 releases ( Module::CoreList version = 0.1 )
  2. CPAN releases Module::CoreList 0.1
  3. Perl 5.22.1 releases ( Module::CoreList version = 0.2_22 )
  4. CPAN releases Module::CoreList 0.2
  5. Perl 5.24.0 releases ( Module::CoreList version = 0.3 )
  6. CPAN releases Module::CoreList 0.3
  7. Perl 5.22.2 releases ( Module::CoreList version = 0.4_22 )
  8. Perl 5.24.1 releases ( Module::CoreList version = 0.4_24 )
  9. CPAN releases Module::CoreList 0.4
  10. Perl 5.26.0 releases ( Module::CoreList version = 0.5 )
  11. CPAN releases Module::CoreList 0.5
  12. Perl 5.22.3 releases ( Module::CoreList version = 0.6_22 )
  13. Perl 5.24.2 releases ( Module::CoreList version = 0.6_24 )
  14. CPAN releases Module::CoreList 0.6

And under normal version semantics, those _22 are significant data, which means legally, the version that ships with perl itself is newer than the version that ships on CPAN.

Recommended Solution

Say that Perl 5.26.1 comes out:

  1. Check the version of Module::CoreList that comes with it
    5.20170715_26
  2. Wait for the equivalent version without the _26 to become available
     5.20170715
  3. Add a virtual/perl-Module-CoreList with a version without the _26 part
    virtual/perl-Module-CoreList-5.201.707.150
  4. Add a perl-core/Module-CoreList for the dual life
    perl-core/Module-CoreList-5.201.707.150
  5. Allow the virtual to alternate between the installed perl and that version.
    || ( =dev-lang/perl-5.26.1* ~virtual/perl-Module-CoreList-5.201.707.150 )
  6. But use the perl visible version in the dual_scripts in dev-lang/perl
    src_remove_dual perl-core/Module-CoreList 5.201.707.152.600_rc corelist

Essentially, we create a small lie here that we never saw the _26 part, and that its not actually there from portages perspective. Any dependency that needs a version with that specific degree of accuracy is surely broken.