Project:Perl/maint-notes/virtual/perl-Module-CoreList
Versioning Headaches around Major Perl releases
This package is tricky versionwise for the following reasons:
- It is shipped with perl itself
- It is dual lifed ( shipped on CPAN as well as in Perl itself )
- Packages can require a specific version of it
- Its versions are date based
- Perl ships maintenance releases
This means this happens ( pretend the number is a month/year )
- Perl 5.24.0 releases ( Module::CoreList version = 0.1 )
- Perl 5.24.1 releases ( Module::CoreList version = 0.2 )
- Perl 5.26.0 releases ( Module::CoreList version = 0.3 )
- 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:
- Perl 5.22.0 releases ( Module::CoreList version = 0.1 )
- CPAN releases Module::CoreList 0.1
- Perl 5.22.1 releases ( Module::CoreList version = 0.2_22 )
- CPAN releases Module::CoreList 0.2
- Perl 5.24.0 releases ( Module::CoreList version = 0.3 )
- CPAN releases Module::CoreList 0.3
- Perl 5.22.2 releases ( Module::CoreList version = 0.4_22 )
- Perl 5.24.1 releases ( Module::CoreList version = 0.4_24 )
- CPAN releases Module::CoreList 0.4
- Perl 5.26.0 releases ( Module::CoreList version = 0.5 )
- CPAN releases Module::CoreList 0.5
- Perl 5.22.3 releases ( Module::CoreList version = 0.6_22 )
- Perl 5.24.2 releases ( Module::CoreList version = 0.6_24 )
- 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:
- Check the version of Module::CoreList that comes with it
5.20170715_26
- Wait for the equivalent version without the
_26
to become available5.20170715
- Add a
virtual/perl-Module-CoreList
with a version without the_26
partvirtual/perl-Module-CoreList-5.201.707.150
- Add a
perl-core/Module-CoreList
for the dual lifeperl-core/Module-CoreList-5.201.707.150
- 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 )
- But use the perl visible version in the
dual_scripts
indev-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.