Speedup get_system_pkg_version() considering only installed packages

This commit is contained in:
Renato Botelho 2017-08-10 19:25:07 -03:00
parent 7f21180757
commit 62121148a6

View File

@ -1219,7 +1219,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) {
@ -1231,7 +1231,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) {