From 935368dba516496e93ac112b3497fd8bc96dfea1 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 23 Apr 2018 10:40:13 +0200 Subject: packages/pkginfo.php: do not fail if mysql has too many dependencies (they're ugly to detect) - rather print a warning on the respective dependency --- packages/pkginfo.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/pkginfo.php b/packages/pkginfo.php index 333f3a1..eef06da 100644 --- a/packages/pkginfo.php +++ b/packages/pkginfo.php @@ -130,7 +130,7 @@ ", ", array_diff( array_merge($dep_it,$js_dep), - array_intersect($dep_it,$js_dep) + $dep_it ) ); @@ -141,6 +141,16 @@ "json: " . implode(", ",$js_dep) ); + foreach ($dependencies as $key => $dep) { + if ($dep["dependency_type"]!="run") { + $dependencies[$key]["json"]="not required"; + continue; + } + foreach ($js_dep as $js) + if ($js == preg_replace("/[<=>].*$/","",$dep["install_target"])) + $dependencies[$key]["json"]=$js; + } + // query dependent packages $mysql_result = mysql_run_query( @@ -453,6 +463,8 @@ if (count($elsewhere)>0) { \n"; + if (!isset ($dep["json"])) + print " (in database only)\n"; if (count($dep["deps"]) == 0) { print " not satisfiable dependency: \"" . $dep["install_target"] . "\"\n"; } else { -- cgit v1.2.3-70-g09d2