Merge pull request #4653 from Icinga/fix/module-dependency-evaluation-4652

Fix module dependency evaluation
This commit is contained in:
Johannes Meyer 2022-02-04 16:24:41 +01:00 committed by GitHub
commit 974bff9227
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -465,7 +465,7 @@ class Manager
}
$operator = '=';
if (preg_match('/^([<>=]{1,2})\s*v?((?:[\d.]+)(?:\D+)?)$/', $version, $match)) {
if (preg_match('/^([<>=]{1,2})\s*v?((?:[\d.]+)(?:.+)?)$/', $version, $match)) {
$operator = $match[1];
$version = $match[2];
}

View File

@ -829,8 +829,7 @@ class Module
if (preg_match('/^([\w\-\/]+)\s+\((.+)\)$/', $part, $m)) {
$metadata->{$key}[$m[1]] = $m[2];
} else {
// TODO: FAIL?
continue;
$metadata->{$key}[$part] = true;
}
}