index : website | |
Archlinux32 website - obsolete | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-04-14 11:23:52 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-04-14 11:23:52 +0200 |
commit | 2096b05a54237735b676ffe495eed7d7b07126f6 (patch) | |
tree | 43ba0dd423dced61f3b4b12131c5c8cdcd06b62e /packages/pkginfo.php | |
parent | 7c2cf88e2180cec54ade61ecf961bcbdac783b65 (diff) |
-rw-r--r-- | packages/pkginfo.php | 17 |
diff --git a/packages/pkginfo.php b/packages/pkginfo.php index 39c6dfd..bf5b406 100644 --- a/packages/pkginfo.php +++ b/packages/pkginfo.php @@ -115,17 +115,24 @@ return $dep["install_target"]; }; - $dep_it = array_map("dependency_extract_name", array_filter( $dependencies, "dependency_is_runtime")); + 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_errors = implode( ", ", array_diff( - array_merge($dep_it,$json_content["Depends On"]), - array_intersect($dep_it,$json_content["Depends On"]) + array_merge($dep_it,$js_dep), + array_intersect($dep_it,$js_dep) ) ); -// if ($dep_errors != "") -// die_500("Dependencies differ: " . $dep_errors); + if ($dep_errors != "") + die_500("Dependencies differ: " . $dep_errors); // query dependent packages |