Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package perl-Math-BigInt-GMP for 
openSUSE:Factory checked in at 2023-10-05 20:05:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Math-BigInt-GMP (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Math-BigInt-GMP.new.28202 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Math-BigInt-GMP"

Thu Oct  5 20:05:06 2023 rev:27 rq:1115800 version:1.6013

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-Math-BigInt-GMP/perl-Math-BigInt-GMP.changes    
    2023-04-20 15:16:13.302573365 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Math-BigInt-GMP.new.28202/perl-Math-BigInt-GMP.changes
     2023-10-05 20:06:19.825600170 +0200
@@ -1,0 +2,12 @@
+Thu Sep 21 03:08:54 UTC 2023 - Tina Müller <[email protected]>
+
+- updated to 1.6013
+   see /usr/share/doc/packages/perl-Math-BigInt-GMP/CHANGES
+
+  1.6013 2023-09-20
+
+   * Sync test files with Math-BigInt.
+
+   * Remove obsolete link to cpanratings.org.
+
+-------------------------------------------------------------------

Old:
----
  Math-BigInt-GMP-1.6012.tar.gz

New:
----
  Math-BigInt-GMP-1.6013.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Math-BigInt-GMP.spec ++++++
--- /var/tmp/diff_new_pack.ntZmsi/_old  2023-10-05 20:06:21.637665634 +0200
+++ /var/tmp/diff_new_pack.ntZmsi/_new  2023-10-05 20:06:21.649666067 +0200
@@ -18,7 +18,7 @@
 
 %define cpan_name Math-BigInt-GMP
 Name:           perl-Math-BigInt-GMP
-Version:        1.6012
+Version:        1.6013
 Release:        0
 License:        Artistic-1.0 OR GPL-1.0-or-later
 Summary:        Backend library for Math::BigInt etc. based on GMP
@@ -29,10 +29,10 @@
 BuildRequires:  perl-macros
 BuildRequires:  perl(Carp) >= 1.22
 BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.58
-BuildRequires:  perl(Math::BigInt) >= 1.999838
+BuildRequires:  perl(Math::BigInt) >= 1.999840
 BuildRequires:  perl(Test::More) >= 0.88
 Requires:       perl(Carp) >= 1.22
-Requires:       perl(Math::BigInt) >= 1.999838
+Requires:       perl(Math::BigInt) >= 1.999840
 %{perl_requires}
 # MANUAL BEGIN
 BuildRequires:  gmp-devel
@@ -58,7 +58,7 @@
 %prep
 %autosetup  -n %{cpan_name}-%{version}
 
-find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path 
"*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644
+find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path 
"*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 
644
 
 %build
 perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"

++++++ Math-BigInt-GMP-1.6012.tar.gz -> Math-BigInt-GMP-1.6013.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.6012/CHANGES 
new/Math-BigInt-GMP-1.6013/CHANGES
--- old/Math-BigInt-GMP-1.6012/CHANGES  2023-04-03 08:36:00.000000000 +0200
+++ new/Math-BigInt-GMP-1.6013/CHANGES  2023-09-20 19:40:08.000000000 +0200
@@ -1,3 +1,9 @@
+1.6013 2023-09-20
+
+ * Sync test files with Math-BigInt.
+
+ * Remove obsolete link to cpanratings.org.
+
 1.6012 2023-04-03
 
  * Sync test files with Math-BigInt.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.6012/MANIFEST.SKIP 
new/Math-BigInt-GMP-1.6013/MANIFEST.SKIP
--- old/Math-BigInt-GMP-1.6012/MANIFEST.SKIP    2023-04-01 14:10:11.000000000 
+0200
+++ new/Math-BigInt-GMP-1.6013/MANIFEST.SKIP    2023-09-20 20:03:59.000000000 
+0200
@@ -1,4 +1,4 @@
-# Start included MANIFEST.SKIP template from ExtUtils::Manifest 1.73
+# Start included MANIFEST.SKIP template from ExtUtils::Manifest 1.75
 
 # Avoid version control files.
 \bRCS\b
@@ -11,6 +11,8 @@
 \B\.gitignore\b
 \b_darcs\b
 \B\.cvsignore$
+\B\.bzr\b
+\B\.bzrignore$
 
 # Avoid VMS specific MakeMaker generated files
 \bDescrip.MMS$
@@ -48,6 +50,7 @@
 \.#
 \.rej$
 \..*\.sw.?$
+\.~\d+~$
 
 # Avoid OS-specific files/dirs
 # Mac OSX metadata
@@ -76,12 +79,12 @@
 # Avoid AppVeyor file
 ^\.?appveyor.yml
 
-# End included /usr/local/share/perl5/site_perl/5.32/ExtUtils/MANIFEST.SKIP
+# End included /usr/local/lib/perl5/ExtUtils/MANIFEST.SKIP
 
 # Avoid more git stuff.
 \B\.gitattributes\b
 
-# Avoid patch files.
+# Avoid patch-related files.
 \.patch$
 \.diff$
 
@@ -107,6 +110,9 @@
 \.lrz$
 \.lzh$
 
+# Avoid development stuff.
+^dev(el)?$
+
 # Avoid distribution-specific stuff.
 ^Math-BigInt-GMP-[0-9]
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.6012/META.json 
new/Math-BigInt-GMP-1.6013/META.json
--- old/Math-BigInt-GMP-1.6012/META.json        2023-04-03 12:49:29.000000000 
+0200
+++ new/Math-BigInt-GMP-1.6013/META.json        2023-09-20 20:14:44.000000000 
+0200
@@ -31,7 +31,7 @@
       "runtime" : {
          "requires" : {
             "Carp" : "1.22",
-            "Math::BigInt" : "1.999838",
+            "Math::BigInt" : "1.99984",
             "XSLoader" : "0.02",
             "perl" : "5.008"
          }
@@ -50,6 +50,6 @@
          "web" : "https://github.com/pjacklam/p5-Math-BigInt-GMP";
       }
    },
-   "version" : "1.6012",
+   "version" : "1.6013",
    "x_serialization_backend" : "JSON::PP version 4.16"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.6012/META.yml 
new/Math-BigInt-GMP-1.6013/META.yml
--- old/Math-BigInt-GMP-1.6012/META.yml 2023-04-03 12:49:23.000000000 +0200
+++ new/Math-BigInt-GMP-1.6013/META.yml 2023-09-20 20:14:39.000000000 +0200
@@ -19,10 +19,10 @@
     - inc
 requires:
   Carp: '1.22'
-  Math::BigInt: '1.999838'
+  Math::BigInt: '1.99984'
   XSLoader: '0.02'
   perl: '5.008'
 resources:
   repository: https://github.com/pjacklam/p5-Math-BigInt-GMP.git
-version: '1.6012'
+version: '1.6013'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.6012/Makefile.PL 
new/Math-BigInt-GMP-1.6013/Makefile.PL
--- old/Math-BigInt-GMP-1.6012/Makefile.PL      2023-04-03 08:27:15.000000000 
+0200
+++ new/Math-BigInt-GMP-1.6013/Makefile.PL      2023-09-20 19:52:09.000000000 
+0200
@@ -36,7 +36,7 @@
    # A hash of modules that are needed to run the module.
 
    'PREREQ_PM'          => {
-                            'Math::BigInt'        => 1.999838,
+                            'Math::BigInt'        => 1.999840,
                             'Carp'                => 1.22,
                             'XSLoader'            => 0.02,
                            },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.6012/README.md 
new/Math-BigInt-GMP-1.6013/README.md
--- old/Math-BigInt-GMP-1.6012/README.md        2023-04-03 12:42:00.000000000 
+0200
+++ new/Math-BigInt-GMP-1.6013/README.md        2023-09-20 20:09:20.000000000 
+0200
@@ -67,10 +67,6 @@
 
     
[http://matrix.cpantesters.org/?dist=Math-BigInt-GMP](http://matrix.cpantesters.org/?dist=Math-BigInt-GMP)
 
-- CPAN Ratings
-
-    
[https://cpanratings.perl.org/dist/Math-BigInt-GMP](https://cpanratings.perl.org/dist/Math-BigInt-GMP)
-
 # LICENSE
 
 This program is free software; you may redistribute it and/or modify it under
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.6012/SIGNATURE 
new/Math-BigInt-GMP-1.6013/SIGNATURE
--- old/Math-BigInt-GMP-1.6012/SIGNATURE        2023-04-03 12:49:39.000000000 
+0200
+++ new/Math-BigInt-GMP-1.6013/SIGNATURE        2023-09-20 20:14:51.000000000 
+0200
@@ -15,30 +15,30 @@
 Hash: RIPEMD160
 
 SHA256 b173bc6027df00777c94cc36850ef64f7b2affeb8ec85593fee91eff5ce4a899 BUGS
-SHA256 acaa3263863eb170a3ca4d4054ce5d27b503be1832823af528e8e2d244649a0c CHANGES
+SHA256 e3e0dfd22be08255925d8ba5a785837bc9e0f3467282f5f4ea17de3cd78d5298 CHANGES
 SHA256 15123cad594aefe6f9f78a0b637ba685991f36865f561686d57c61b13eca1ae0 CREDITS
 SHA256 7ddda45c10ba55b6713c512b418d706278b1e260e94008d599b2709cbfa166d0 GMP.xs
 SHA256 b857edab549ac6893e2df5e1ec768ee46b62bcf1607a55e876f4d23f079eacce LICENSE
 SHA256 283a887525057e82bc986996c36c5aef1919f12e46fbb14f192295b6800fafdc 
MANIFEST
-SHA256 cea319b25473049674f5cc8c9bfa5b90f0b78383d4af657b8cf4bdd9ea4dd40c 
MANIFEST.SKIP
-SHA256 e24a8dfeef64344b4f107a5ab8d7cea92438eb0642ce24f75bc25b29a7126450 
META.json
-SHA256 86482d141fe4345c2c80a00453b6c382382a6c49a023ebc00032528d306d5f32 
META.yml
-SHA256 918743db3c7dfcce0384bc351dbd705f0dc831bf7054196ea0202f39d5f2414a 
Makefile.PL
+SHA256 b35b403ef05c2d049464dc894f2c4aaa7c214af0925a6175adcdf152e2a4ff5e 
MANIFEST.SKIP
+SHA256 a9b50ec42882c51ee02121756b1d232457be9b11b54b51646493d6b97f1887de 
META.json
+SHA256 656e7f01507e37adf89a341ba84ed14a3effcc6a550ca60e1751570897c5e446 
META.yml
+SHA256 85c0dab056a0d3af31bded1b5ce897c1065bb779a3f4e2c9fb458475c0c21d52 
Makefile.PL
 SHA256 29860c37d5c1b8260c51206c28b7580ae6b03df165e2ec266db5d2f373a8a80e README
-SHA256 cc43859594b7bd2e14bb5ada4c8a01c437010283d4fddd92d86191d109010f78 
README.md
+SHA256 7f237bd49206aa66675265834a76013ad984ab5eb251f3a0e08909d864be8075 
README.md
 SHA256 672c89aacd483edd14cbe5ee7db5dfa2991addad05f0d920d2424dfe507592f0 TODO
 SHA256 ceed5e08784e849958f8aa74c536c008ad89cdce1612571ee38321293fc91250 
build/README
 SHA256 9850d025676d6bd49c4703ae2091f95266cf457a5b033f457b9cf073f6a2c33f 
build/leak.pl
 SHA256 fbe60701f97bf64e468ebaae5fb4805409a61fa71793133d14909e0b9733e9fc 
build/leaktest
 SHA256 7ac0dbf02aa5f9fffd64599358320f60388e95de64f9ae7a6d718cf224a0b433 
inc/Devel/CheckLib.pm
-SHA256 aa9eabf6ec786113f0fc40d7bbb048489583b4f0babb669f6975cd6e648b3e72 
lib/Math/BigInt/GMP.pm
+SHA256 f743fa9b8c1edf3f5057c11a7c4647e92088684ce9f8ef3cf318e472186e5264 
lib/Math/BigInt/GMP.pm
 SHA256 f855e68d0f171debf8369ead8b36d004188f1c9069287a0d3c67a87f9afb1312 
t/00sig.t
 SHA256 02d11ba7425bc433a45b924752fcd7c3fb0840e78df7dc4c5b1eb572cc571873 
t/01load.t
 SHA256 9567333ab26747265ddf9bbcda1d6a672b71c6e85eb2cad3021ba7d2f96eb1c1 
t/Math/BigInt/Lib/TestUtil.pm
-SHA256 b5f6aacf13dc567671170a4086a03c43143af31b3596542e521464c5db19bba1 
t/bigfltpm.inc
+SHA256 a4f89e3db1fc09ed210ebfb999ab73cf0636530053904c2f013a02cda2a86712 
t/bigfltpm.inc
 SHA256 ba90ef638a3c5cd2be536e53144c37687d49c213bf3e0945c966012a6395fbf7 
t/bigfltpm.t
 SHA256 b4c6c2c6539673ca4317d1edf14d0088d975c0c27ebe409f773a3b390d509d71 
t/bigintg.t
-SHA256 4a27c4823323437af76bce2b33e6147891bfb5d0e0bb9d3dbc5e70931bc62882 
t/bigintpm.inc
+SHA256 15f2e068f246498863a59f774c86ff7c0a6d46d2ce8e80bb877af5184f36485e 
t/bigintpm.inc
 SHA256 3f2f7ace432bf43336f143602aed02f30247df2f45cba918ce55f55529d66be0 
t/bigintpm.t
 SHA256 2c9176d4f4ade203eabc81baeb3d51bc13370da33292335f3fc073c35fbe280e 
t/biglog.t
 SHA256 b8af8e548686d7132b27fad6f115a1b5c7b938260351a0a8233a4c6d6d824c99 
t/bigroot.t
@@ -165,7 +165,7 @@
 SHA256 a37a38d9b507b98f55a17efc4f2fd54e4c45e20ec2cb5067606a4501dd634494 
xt/release/cpan-changes.t
 SHA256 befb07cbace153e844bd1aa24309e8136f0265cc97708bfb2f5f427964f7a88d 
xt/release/dist-manifest.t
 SHA256 dfba9c5f1e2b047a07c92747e523aceeab0d692a1bf655c2658386e45d9b4311 
xt/release/distmeta.t
-SHA256 fc6f9ed47fe31cadd15c83309921e5ec6680c09f8cbb7a24ba34b1c9db5b3272 
xt/release/git.t
+SHA256 2f6418e76023a02d013902d68fb5d7a957bb4ba09b6150b05a4baf2efcd73386 
xt/release/git.t
 SHA256 48b9362ce2e88ef6a3dd81f820232165584d251861a27bde99ba6a707ea8e61c 
xt/release/kwalitee.t
 SHA256 c6f4a981a4c1990e5f524646375b7b219c29cba04869438e5463c096c808bf09 
xt/release/minimum-version.t
 SHA256 efaab69873029c816c328623fc06ab2488148b627b969dbd071761dd68a1a40b 
xt/release/pod-coverage.t
@@ -176,11 +176,11 @@
 SHA256 79e228dfe3193c0f2b5f9afaa6677062ef33ac9c9578e0e6c5a627696c319982 
xt/release/version.t
 -----BEGIN PGP SIGNATURE-----
 
-iQEcBAEBAwAGBQJkKq8+AAoJEGcmPl2fr166PZ4IAK+8GD+dGMtDWIgbKiLQ798/
-hU8YRmeZWDdwdjwgyfE3ZOgbbWX+PkQ08FAYy6wJGUExszGRartOIL0zvWm0y+Ri
-cDeLbKxNOhlnAxAzY44glaE5TtWh8RpaP+e0WKROgmxOeLVjs9DC5r+XhlzDqCnP
-B7XInVOLdP80g0QZRss6G1oB9qV6FX5/4PhnnF0qscdjsrNSJoslrM36UXy68CEP
-S2Rm1cqM8c80fhn7OxWIlj1807BLEk+csw6+Vrn8+AI1ombDRXP0UAxb5PH0R2mr
-gGdjOYFIujBFZfaoDq5V20nutTu1A3fesNCRwf84xBDZf7IgtDHimCHLuaGLov8=
-=9I7H
+iQEcBAEBAwAGBQJlCzaXAAoJEGcmPl2fr166DLYH+wRwIyIbWSnWurujFj1DVr0J
+xMWEZJ1jODkcyXZE60EdzjrF8DxRiC1/zDDQB2AgabZcmTvXthHjgZ0a9enznBFU
+HyrAsImbf0aB6SDHdQcPcVabr+XzlwIo7Oon7uMDpvSShtztI8qLi/MgH/vo4Fsa
+31srJEmb8hyFqFUiHWE1qoIGTbAq4tW3JlBVvBRjSyDI9FJiC4vZUmlD9wNQd1U1
+8zJQRDmnpMFmFrX4xjnTIHSPKw1Py8NV7qdRMMuN++h1Enp/8Fw4p0W7uoyrsO1J
+9o2EJyaPX5ddYEdh1QP2pjIL+SjHKUXXq9DNyugUixosReRH0lJnsIh0luHsLZY=
+=iljV
 -----END PGP SIGNATURE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.6012/lib/Math/BigInt/GMP.pm 
new/Math-BigInt-GMP-1.6013/lib/Math/BigInt/GMP.pm
--- old/Math-BigInt-GMP-1.6012/lib/Math/BigInt/GMP.pm   2023-04-01 
18:01:26.000000000 +0200
+++ new/Math-BigInt-GMP-1.6013/lib/Math/BigInt/GMP.pm   2023-09-20 
19:37:40.000000000 +0200
@@ -8,7 +8,7 @@
 
 our @ISA = qw< Math::BigInt::Lib >;
 
-our $VERSION = '1.6012';
+our $VERSION = '1.6013';
 
 use XSLoader;
 XSLoader::load "Math::BigInt::GMP", $VERSION;
@@ -118,10 +118,6 @@
 
 L<http://matrix.cpantesters.org/?dist=Math-BigInt-GMP>
 
-=item CPAN Ratings
-
-L<https://cpanratings.perl.org/dist/Math-BigInt-GMP>
-
 =back
 
 =head1 LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.6012/t/bigfltpm.inc 
new/Math-BigInt-GMP-1.6013/t/bigfltpm.inc
--- old/Math-BigInt-GMP-1.6012/t/bigfltpm.inc   2022-05-15 17:57:05.000000000 
+0200
+++ new/Math-BigInt-GMP-1.6013/t/bigfltpm.inc   2023-09-20 19:01:53.000000000 
+0200
@@ -466,17 +466,17 @@
 
 # 2 * (2 ** int(18.2));
 $x <<= $y;
-is($x->copy()->bfround(-9), "602248.763144685",
+is($x, 524288,
    qq|\$x = $CLASS->new("2"); \$y = $CLASS->new("18.2");| .
-   q| $x <<= $y; $x->copy()->bfround(-9);|);
+   q| $x <<= $y|);
 
-# 2 * (2 ** 18.2) / (2 ** 18.2) => 2
+# 2 * (2 ** int(18.2)) / (2 ** int(18.2)) => 2
 is($x >>= $y, 2,
    qq|\$x = $CLASS->new("2"); \$y = $CLASS->new("18.2");| .
-   q| $x <<= $y; $x->copy()->bfround(-9); $x >>= $y|);
+   q| $x <<= $y; $x >>= $y|);
 is($x, 2,
    qq|\$x = $CLASS->new("2"); \$y = $CLASS->new("18.2");| .
-   q| $x <<= $y; $x->copy()->bfround(-9); $x >>= $y; $x|);
+   q| $x <<= $y; $x >>= $y; $x|);
 
 __DATA__
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.6012/t/bigintpm.inc 
new/Math-BigInt-GMP-1.6013/t/bigintpm.inc
--- old/Math-BigInt-GMP-1.6012/t/bigintpm.inc   2022-05-15 17:57:05.000000000 
+0200
+++ new/Math-BigInt-GMP-1.6013/t/bigintpm.inc   2023-09-20 19:01:53.000000000 
+0200
@@ -1451,14 +1451,14 @@
 +2:+2:8
 +1:+32:4294967296
 +1:+48:281474976710656
-+8:-2:NaN
++8:-2:2
 # exercise base 10
 +12345:4:10:123450000
 -1234:0:10:-1234
 +1234:0:10:1234
 +2:2:10:200
 +12:2:10:1200
-+1234:-3:10:NaN
++1234:-3:10:1
 1234567890123:12:10:1234567890123000000000000
 -3:1:2:-6
 -5:1:2:-10
@@ -1470,14 +1470,14 @@
 +8:+2:2
 +4294967296:+32:1
 +281474976710656:+48:1
-+2:-2:NaN
++2:-2:8
 # exercise base 10
 -1234:0:10:-1234
 +1234:0:10:1234
 +200:2:10:2
 +1234:3:10:1
 +1234:2:10:12
-+1234:-3:10:NaN
++1234:-3:10:1234000
 310000:4:10:31
 12300000:5:10:123
 1230000000000:10:10:123
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.6012/xt/release/git.t 
new/Math-BigInt-GMP-1.6013/xt/release/git.t
--- old/Math-BigInt-GMP-1.6012/xt/release/git.t 2021-09-20 14:46:43.000000000 
+0200
+++ new/Math-BigInt-GMP-1.6013/xt/release/git.t 2023-06-01 21:24:03.000000000 
+0200
@@ -6,6 +6,7 @@
 use IO::Pipe;
 use IO::File;
 use IO::Dir;
+
 use File::Which    qw< which >;
 use Sort::Versions qw< versioncmp >;
 
@@ -129,7 +130,18 @@
       or die "$filename: can't open file for reading: $!\n";
 
     while (defined(my $line = <$fh>)) {
-        push @vers, $1 if $line =~ /^(\S+)/;
+        if ($line =~ /^(\S+)/) {
+            my $verstr = $1;
+            if ($verstr =~ / ^ v? ( \d+ ( \. \d+ ( _ \d+ )* )? ) $ /ix) {
+                my $vernum = $1;
+                $vernum =~ tr/_//d;
+                push @vers, [ $verstr, $vernum ];
+                last;                   # only get the first one
+            } else {
+                printf STDERR "  Ignoring version number '%s' in %s line %u\n",
+                  $verstr, $filename, $.;
+            }
+        }
     }
 
     $fh -> close()
@@ -138,22 +150,18 @@
 
 # Sort the versions.
 
-@vers = sort { versioncmp($a, $b) } @vers;
+#@vers = sort { versioncmp($a, $b) } @vers;
 
 unless (@vers) {
     print "not ";
     $failno++;
 }
 print "ok ", ++$testno, " - found version number(s) in changelog file(s)";
-print " ('$vers[-1]')" if @vers;
+print " ('$vers[0][0]')" if @vers;
 print "\n";
 
-# Get most recent version (migth be undef).
-
-my $ver = $vers[-1];
-
 
################################################################################
-# Get the all the git tags.
+# Get the all the git tags that look like version numbers.
 
################################################################################
 
 my @tags;
@@ -162,44 +170,44 @@
     my @args = ('git', 'tag', '-l');
     $pipe -> reader(@args);
     while (defined(my $tag = <$pipe>)) {
-        next unless $tag =~ /^v?\d/;
         $tag =~ s/\s+\z//;
-        push @tags, $tag;
+        if ($tag =~ / ^ v? ( \d+ ( \. \d+ ( _ \d+ )* )? ) /ix) {
+            my $vernum = $1;
+            $vernum =~ tr/_//d;
+            push @tags, [ $tag, $vernum ];
+        }
     }
     $pipe -> close() or die "can't close pipe after reading: $!";
 }
 
 # Sort the tags.
 
-@tags = sort { versioncmp($a, $b) } @tags;
+#@tags = sort { versioncmp($b, $b) } @tags;
+@tags = sort { $b -> [1] <=> $a -> [1] } @tags;
 
 unless (@tags) {
     print "not ";
     $failno++;
 }
 print "ok ", ++$testno, " - found git tag(s)";
-print " ('$tags[-1]')" if @tags;
+print " ('", $tags[0][0], "')" if @tags;
 print "\n";
 
-# Get newest tag (might be undef).
-
-my $tag = $tags[-1];
-
 
################################################################################
 # Compare version number with git tag.
 
################################################################################
 
 ++$testno;
 if (@vers and @tags) {
-    my $ok = versioncmp($ver, $tag) == 0;
+    my $ok = $vers[0][0] eq $tags[0][0];
     unless ($ok) {
         print "not ";
         $failno++;
     }
     print "ok ", $testno, " - changelog version matches git tag\n";
     print STDERR <<"EOF" unless $ok;
-#   latest version in changelog(s): $ver
-#                   latest git tag: $tag
+#   latest version in changelog(s): $vers[0][0]
+#                   latest git tag: $tags[0][0]
 EOF
 } else {
     print "ok ", $testno, " - skipped (missing version number or git tag)\n";
@@ -217,7 +225,7 @@
 ++$testno;
 if (@tags) {
     my $pipe = IO::Pipe -> new();
-    my @args = ('git', 'rev-parse', $tag);
+    my @args = ('git', 'rev-parse', $tags[0][0]);
     $pipe -> reader(@args);
     $commit_tagged = <$pipe>;
     chomp $commit_tagged if defined $commit_tagged;
@@ -226,7 +234,7 @@
         print "not ";
         $failno++;
     }
-    print "ok ", $testno, " - tag ('$tag') refers to a commit";
+    print "ok ", $testno, " - tag ('$tags[0][0]') refers to a commit";
     print " ('$commit_tagged')" if $commit_tagged;
     print "\n";
 } else {

Reply via email to