summaryrefslogtreecommitdiffstats
path: root/checkpkgist.php
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-04-04 15:49:14 +0200
committerRemi Collet <remi@remirepo.net>2017-04-04 15:49:14 +0200
commite7695576b78f8f7460783a874c0c5b1797195b1c (patch)
treee24a52e84dbd7715f55c9b1d4b6097cbd5ee90f0 /checkpkgist.php
parentee7592a488501c4a8cb1842e485586e83fc0e1e6 (diff)
improv. multi-version case
Diffstat (limited to 'checkpkgist.php')
-rwxr-xr-xcheckpkgist.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/checkpkgist.php b/checkpkgist.php
index a91e1ab..e853081 100755
--- a/checkpkgist.php
+++ b/checkpkgist.php
@@ -81,13 +81,14 @@ function getMax($name, $rpm) {
$crt = 0;
$max = 9999;
- if (preg_match('/[0-9]+$/', $rpm, $reg)) {
- // This already a versionned name
- $crt = intval($reg[0]);
- }
if (isset($vers[$rpm])) {
$crt = $vers[$rpm];
$max = $crt+1;
+
+ } else if (preg_match('/[0-9]+$/', $rpm, $reg)) {
+ // This already a versionned name
+ $crt = intval($reg[0]);
+ $max = $crt+1;
}
foreach($rpms as $alt) {
if ($alt != $rpm && preg_match('/[0-9]+$/', $alt, $reg)) {