## Background

I'm the current maintainer of  https://github.com/openSUSE/cpanspec and I 
do automatic updates to devel:languages:perl with it.

Perl module versions are decimal versions, and semantically split in triplets.

    CPAN       --> Normalized, semantical meaning from perl's point of 
view
    0.7        --> 0.700.0
    0.71       --> 0.71.0
    0.70       --> 0.70.0
    0.07       --> 0.70.0
    0.007      --> 0.7.0
    1.20230726 --> 1.202.307.260

Currently, perl.prov takes the module versions literally, which can lead to 
false / broken dependencies if the number of decimals for a module version 
changes.
E.g. a very common thing is a module with the current version 1.29 (which is 
semantically 1.290.0) that releases 1.3 (1.300.0) as the next version.
Taking the 1.29 and 1.3 literally in the rpm, 1.3 would be lower than 1.29.

We usually fix that manually, but we have 3200 perl modules in 
devel:languages:perl and 1400 in Factory.

The correct way would be to use

    version->parse($cpan_version)->normal

However, we can't just fix the existing perl.prov because we cannot 
guarantee that all packages will be rebuilt at once across all repositories. 
There needs to be a transition period also.

Also other users of rpm maybe don't want that new behaviour.

## Proposal

So I created a new script besides `perl.prov`, `perl.prov.normalize`.

It would be good if I could actually reuse most of it's code, maybe even 
simply call `perl.prov` and then manipulate the output.

But for this frst draft I wanted to get your feedback if such a PR is welcome 
or if it should be done in a new package outside of rpm.

I could then use this script in the spec files of new perl module releases. 
Until then there will be a transition period where I might generate Provides 
lines in the spec file additionally to the current perl.prov, which would 
guarantee that we don't get unresolvables.

For the detailed background see: https://github.com/openSUSE/cpanspec/issues/47 
cpanspec is the script which we use to generate the spec files.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/2586

-- Commit Summary --

  * Add a new perl.prov script to generate normalized module versions

-- File Changes --

    A scripts/perl.prov.normalize (224)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/2586.patch
https://github.com/rpm-software-management/rpm/pull/2586.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2586
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to