From d2693f0078c4a9b6e904ac0b398f4c4eb5be2713 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 23 Apr 2020 09:36:45 +0200 Subject: simplify testing rpm version like URPM does It's no more needed to list all point version unless there's a change in them we want to test for (such as 4.12.90) Thus fixing detecting unlisted rpm versions such as http://www.cpantesters.org/cpan/report/1d673d18-503a-11ea-8fff-b48f1f24ea8f where 4.13.0.1 wasn't listed and thus choked on rpm >= 4.15 code path set by commit 9e3deaefdbc54910d58dea28d06c2678673c9d09 --- RPM4/NEWS | 2 ++ RPM4/src/Makefile.PL | 11 +---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/RPM4/NEWS b/RPM4/NEWS index 4a127e2..cde70a7 100644 --- a/RPM4/NEWS +++ b/RPM4/NEWS @@ -1,3 +1,5 @@ +- fix detecting unlisted rpm versions + Version 0.41 - 14 February 2020 - fix detecting rpm-4.15.x final diff --git a/RPM4/src/Makefile.PL b/RPM4/src/Makefile.PL index 6dbf55c..009c45c 100644 --- a/RPM4/src/Makefile.PL +++ b/RPM4/src/Makefile.PL @@ -33,20 +33,11 @@ print $FH ' * $Id$' . "\n"; print $FH " */\n\n"; print $FH "#ifndef RPMVERSION_H\n#define RPMVERSION_H\n\n"; foreach (qw( - 4.9.0 - 4.9.1 - 4.9.1.1 - 4.9.1.2 - 4.10.0 - 4.11.0 - 4.11.1 - 4.11.2 - 4.11.3 - 4.12.0 4.12.90 4.15.0 )) { my $v = $_; + $rpmv < $v and last; $v =~ s/\./_/g; print $FH "#define RPM$v\n"; $rpmv =~ /^\Q$_/ and last; -- cgit v1.2.1