diff options
author | Remi Collet <remi@remirepo.net> | 2023-02-08 07:47:44 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2023-02-08 07:47:44 +0100 |
commit | 6cda13e5b2009b165c1cb5668340b3290a00abb9 (patch) | |
tree | 0ade98965c34137e4bed95a92aa771083377b04f /phpMyAdmin-bundled.php | |
parent | 6c198953bcd17afe44d303220ec959d88ffc2891 (diff) |
update to 5.2.1 (2023-02-08, security and bugfix release)
Diffstat (limited to 'phpMyAdmin-bundled.php')
-rw-r--r-- | phpMyAdmin-bundled.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/phpMyAdmin-bundled.php b/phpMyAdmin-bundled.php index 5f2cb89..ee018ef 100644 --- a/phpMyAdmin-bundled.php +++ b/phpMyAdmin-bundled.php @@ -18,9 +18,16 @@ if (!is_array($pkgs)) { $lic = []; if (isset($pkgs['packages'])) { - foreach($pkgs['packages'] as $pkg) { - printf("Provides: bundled(php-%s) = %s\n", str_replace(['/', '_'], ['-', '-'], $pkg['name']), $pkg['version']); - $lic = array_merge($lic, $pkg['license']); + $res = []; + foreach($pkgs["packages"] as $pkg) { + $lic = implode(" and ", $pkg["license"]); + if (!isset($res[$lic])) $res[$lic] = []; + $res[$lic][] = sprintf("Provides: bundled(php-%s) = %s", str_replace(["/", "_"], ["-", "-"], $pkg["name"]), $pkg["version"]); + } + ksort($res); + foreach($res as $lic => $lib) { + sort($lib); + printf("# License %s\n%s\n", $lic, implode("\n", $lib)); } } else if (isset($pkgs['dependencies'])) { foreach($pkgs['dependencies'] as $pkg) { @@ -35,5 +42,3 @@ if (isset($pkgs['packages'])) { echo "unkown content\n"; exit(4); } -sort($lic); -printf("\nLicense: %s\n", implode(' and ', array_unique($lic))); |