action #164314
Updated by tinita 5 months ago
## Motivation
Comparison between perl package versions in SUSE should work without having to manually fix the number of decimal digits sometimes.
Details: https://github.com/openSUSE/cpanspec/issues/47
This issue is mostly to track my work on that.
## Steps
### A: d:l:p only
Convert all modules that are only in devel:languages:perl, but not in Factory. Since those are not critical, that can take multiple days, in between there might be some unresolvables.
### B: Factory
1. Update all "Provides" data d:l:p modules that are in Factory.
1. perl-Foo-Bar `Version: 1.23` becomes `Version: 1.230.0`, `Provides: perl(Foo::Bar) 1.230.0`, but `Requires: perl(Foo::Bar) >= 1.23` in other modules won't be updated yet.
1. After all updates from the previous step landed in Factory/Tumleweed, the `Requires` lines can be updated
### C: Core modules
Think about a strategy for core modules. E.g. there is `Module::CoreList 5.20240720` and `CPAN 2.36`.
If we would update the perl.prov script for the `perl` package to produce normalized versions, it would report:
```
Provides: perl(Module::CoreList) 5.202.407.20
Provides: perl(CPAN) 2.360.0
```
If we update all `Requires` in d:l:p, we would have for example:
```
Requires: perl(Module::CoreList) >= 5.202.301.01
Requires: perl(CPAN) >= 2.310.0
```
That works for the perl package in d:l:p and in Factory. But in Leap we have an older perl version, so the second line will be unresolvable.
Either perl.prov has to be updated for Leap as well at some point, but then older modules in Leap will have the old require lines, e.g. `Requires: perl(Module::CoreList) >= 520230101` and that will fail.
For now I keep all modules that are in perl core 5.40 in their original format. Of course that might need updates with every new perl version, when modules are added or removed from the core.
It would be useful if we could have a condition on the perl version in the spec, e.g.
```
%if perl >= 5.40.0
Requires: perl(CPAN) >= 2.310.0
%else
Requires: perl(CPAN) >= 2.31
%endif
```
Or depending on the suse_version might also work. For that I would need reliable information on when perl 5.40 will land in Leap.
Consider OS version checking in spec files on Perl core modules.