From d4fbf5b7987b2ea5776f31ffda24bddb9854ee1b Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Thu, 10 Aug 2017 19:25:07 -0300 Subject: [PATCH] Speedup get_system_pkg_version() considering only installed packages --- src/etc/inc/pkg-utils.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/etc/inc/pkg-utils.inc b/src/etc/inc/pkg-utils.inc index 9130ed647b..8ec499f18e 100644 --- a/src/etc/inc/pkg-utils.inc +++ b/src/etc/inc/pkg-utils.inc @@ -1202,7 +1202,7 @@ function get_system_pkg_version($baseonly = false, $use_cache = true) { return false; } - $info = get_pkg_info($base_pkg, true); + $info = get_pkg_info($base_pkg, true, true); $pkg_info = array(); foreach ($info as $item) { @@ -1214,7 +1214,7 @@ function get_system_pkg_version($baseonly = false, $use_cache = true) { if (empty($pkg_info) || (!$baseonly && ($pkg_info['version'] == $pkg_info['installed_version']))) { - $info = get_pkg_info($meta_pkg, true); + $info = get_pkg_info($meta_pkg, true, true); foreach ($info as $item) { if ($item['name'] == $meta_pkg) {