summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-08-10 19:25:07 -0300
committerRenato Botelho <renato@netgate.com>2017-08-10 19:25:07 -0300
commitd4fbf5b7987b2ea5776f31ffda24bddb9854ee1b (patch)
treec262e422d613253d52b2083e74c260e6f6ae2b16
parente8f8aeb631079e15d434b7ad80e3a553210bc777 (diff)
downloadpfsense-d4fbf5b7987b2ea5776f31ffda24bddb9854ee1b.zip
pfsense-d4fbf5b7987b2ea5776f31ffda24bddb9854ee1b.tar.gz
Speedup get_system_pkg_version() considering only installed packages
-rw-r--r--src/etc/inc/pkg-utils.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/etc/inc/pkg-utils.inc b/src/etc/inc/pkg-utils.inc
index 9130ed6..8ec499f 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) {
OpenPOWER on IntegriCloud