Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/packages/pkginfo.php
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-04-14 12:59:59 +0200
committerErich Eckner <git@eckner.net>2018-04-14 12:59:59 +0200
commit529b73bbd39bdf21afbc892204907c26948dc2b9 (patch)
treeabd4396914e5616b660391120b00ee5762e384a1 /packages/pkginfo.php
parent74f3e8a6a57d7fe1b930571778259f03c251cc74 (diff)
packages/pkginfo.php: fix preg_replace
Diffstat (limited to 'packages/pkginfo.php')
-rw-r--r--packages/pkginfo.php14
1 files 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. "<br>\n" .
+ "mysql: " . implode(", ",$dep_it) . "<br>\n" .
+ "json: " . implode(", ",$js_dep)
+ );
// query dependent packages