From 529b73bbd39bdf21afbc892204907c26948dc2b9 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sat, 14 Apr 2018 12:59:59 +0200 Subject: packages/pkginfo.php: fix preg_replace --- packages/pkginfo.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/pkginfo.php b/packages/pkginfo.php index 22b50dd..cf89e9b 100644 --- a/packages/pkginfo.php +++ b/packages/pkginfo.php @@ -118,14 +118,10 @@ return $dep["install_target"]; }; - function truncate_version($name) { - return preg_replace("[<=>].*$","",$name); - } - $dep_it = array_filter( $dependencies, "dependency_is_runtime"); $dep_it = array_map("dependency_extract_name", $dep_it); - $dep_it = array_map("truncate_version", $dep_it); - $js_dep = array_map("truncate_version", $json_content["Depends On"]); + $dep_it = preg_replace("/[<=>].*$/","",$dep_it); + $js_dep = preg_replace("/[<=>].*$/","",$json_content["Depends On"]); $dep_errors = implode( ", ", array_diff( @@ -135,7 +131,11 @@ ); if ($dep_errors != "") - die_500("Dependencies differ: " . $dep_errors); + die_500( + "Dependencies differ: " . $dep_errors. "
\n" . + "mysql: " . implode(", ",$dep_it) . "
\n" . + "json: " . implode(", ",$js_dep) + ); // query dependent packages -- cgit v1.2.3-70-g09d2