[opensuse-packaging] perl "versioning" and rpm
Hi, fell over the problem, that perl usually is using other versioning scheme than rpm is. Example: Version changes of perl-Sub-Uplevel 0.22 Tue Nov 17 05:38:42 EST 2009 0.21_01 Sat Nov 29 15:24:49 EST 2008 0.2002 Thu Sep 11 14:33:09 EDT 2008 0.2001 Tue Sep 9 22:22:40 EDT 2008 0.20 Tue Sep 9 19:23:35 EDT 2008 perl is using a decimalized versioning, where 0.22 > 0.2002, but for rpm it isn't. I think most perl Module Authors do not really know, that they are using a decimalized versioning. IMHO ther perl version should be normalized for packaging. 0.22 would be normalized to 0.220.0 (version->new(0.22)->normal) and 0.2002. would be normalized to 0.200.200. I can adopt cpanspec to do this for newly created packages, but this will only work for perl(version) >= 0.77 (openSuSE >= 1130). And the two scripts (perl.prov, perl.req) delivered with rpm should be adopted too, cause "find-provides". What do you think ? Chris -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On 08/16/2010 at 11:14 AM, Christian <chris@computersalat.de> wrote: IMHO ther perl version should be normalized for packaging.
0.22 would be normalized to 0.220.0 (version->new(0.22)->normal) and 0.2002. would be normalized to 0.200.200.
I can adopt cpanspec to do this for newly created packages, but this will only work for perl(version) >= 0.77 (openSuSE >= 1130).
if you consider them 'decimalized', why not simply make it strict on 4 decimals? 0.2000 > 0.2001 > 0.2002 > 0.2200 I can't just understand why you introduce a 2nd dot after the 3rd decimal. It appears much more difficult to understand that 0.2002 ==> 0.200.200 than it being 0.2002 :) Dominique -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hi Dominique, Am 16.08.2010 11:24, schrieb Dominique Leuenberger:
On 08/16/2010 at 11:14 AM, Christian <chris@computersalat.de> wrote: IMHO ther perl version should be normalized for packaging.
0.22 would be normalized to 0.220.0 (version->new(0.22)->normal) and 0.2002. would be normalized to 0.200.200.
I can adopt cpanspec to do this for newly created packages, but this will only work for perl(version) >= 0.77 (openSuSE >= 1130).
if you consider them 'decimalized', why not simply make it strict on 4 decimals?
0.2000 > 0.2001 > 0.2002 > 0.2200 I know that there would be no problem when the amount of decimals does not change.
And as mentioned before, I think a lot of packagers don't know they are using decimalized versioning. They use 0.xxx and count +1 wise. (no problem with rpm)
I can't just understand why you introduce a 2nd dot after the 3rd decimal. It appears much more difficult to understand that 0.2002 ==> 0.200.200 than it being 0.2002 :)
I do not introduce it. I try to fix versioning problems of perl <-> rpm Please read: http://tinyurl.com/versionnumbers The Author "David Golden" changed the amount of decimals from 2 to 4, which is allowed in perl. And when changing amount of decimals, then "WE" (rpm) will have problems. 0.22 > 0.2002 (in the perl world) 0.22 < 0.2002 (in the rpm world) Chris -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Mon, Aug 16, 2010 at 11:14:05AM +0200, Christian wrote:
fell over the problem, that perl usually is using other versioning scheme than rpm is.
Example: Version changes of perl-Sub-Uplevel 0.22 Tue Nov 17 05:38:42 EST 2009
0.21_01 Sat Nov 29 15:24:49 EST 2008
0.2002 Thu Sep 11 14:33:09 EDT 2008
0.2001 Tue Sep 9 22:22:40 EDT 2008
0.20 Tue Sep 9 19:23:35 EDT 2008
perl is using a decimalized versioning, where 0.22 > 0.2002, but for rpm it isn't.
That's actually not true: perl -e 'print "decimal\n" if v0.22 ge v0.2002' or perl -e 'print version->parse("0.22") <=> version->parse("0.2002"), "\n"' Seems like the Author of Sub-Uplevel doesn't understand versions. Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
perl is using a decimalized versioning, where 0.22 > 0.2002, but for rpm it isn't.
That's actually not true:
perl -e 'print "decimal\n" if v0.22 ge v0.2002'
sorry but: perl -e 'print "decimal\n" if 0.22 ge 0.2002' and perl -e 'print "equal\n" if 0.22 == version->new(0.22)->numify' or perl -e 'print "equal\n" if 0.22 == version->new(v0.220.0)->numify'
or
perl -e 'print version->parse("0.22") <=> version->parse("0.2002"), "\n"'
Seems like the Author of Sub-Uplevel doesn't understand versions.
The Author adviced me to read: http://tinyurl.com/versionnumbers Cheers, Chris -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Wed, Aug 25, 2010 at 10:42:58AM +0200, Christian wrote:
perl is using a decimalized versioning, where 0.22 > 0.2002, but for rpm it isn't.
That's actually not true:
perl -e 'print "decimal\n" if v0.22 ge v0.2002'
sorry but: perl -e 'print "decimal\n" if 0.22 ge 0.2002'
Maybe, but that's not how perl compares versions: $ cat Foo.pm package Foo; our $VERSION = '0.22'; 1; $ perl -e 'use Foo 0.2002' $ perl -e 'use Foo 0.23' Foo version 0.23 required--this is only version 0.22 at -e line 1. BEGIN failed--compilation aborted at -e line 1. Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Wed, Aug 25, 2010 at 11:43:05AM +0200, Michael Schroeder wrote:
Maybe, but that's not how perl compares versions:
$ cat Foo.pm package Foo; our $VERSION = '0.22'; 1; $ perl -e 'use Foo 0.2002' $ perl -e 'use Foo 0.23' Foo version 0.23 required--this is only version 0.22 at -e line 1. BEGIN failed--compilation aborted at -e line 1.
Hmm, seems I got that wrong. The 'use Foo 0.2002' should complain, of course. Looks like perl does some weird things internally, the version parsing code really looks awful. Cheers, Micha. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (3)
-
Christian
-
Dominique Leuenberger
-
Michael Schroeder