From d1c57eb8e1699f36a3ccda53cef2e28b10eeca92 Mon Sep 17 00:00:00 2001 From: Stephen Beaver Date: Sat, 7 May 2016 13:42:01 -0400 Subject: [PATCH] Workaound fixes #6320 --- src/etc/inc/pkg-utils.inc | 5 ++--- src/usr/local/www/pkg_mgr_install.php | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/etc/inc/pkg-utils.inc b/src/etc/inc/pkg-utils.inc index 0857fb094f..a8f35f0b8b 100644 --- a/src/etc/inc/pkg-utils.inc +++ b/src/etc/inc/pkg-utils.inc @@ -1115,7 +1115,7 @@ function get_base_pkg_name() { } /* Verify if system needs upgrade (meta package or base) */ -function get_system_pkg_version() { +function get_system_pkg_version($baseonly = false) { global $g; $base_pkg = get_base_pkg_name(); @@ -1135,8 +1135,7 @@ function get_system_pkg_version() { } } - if (empty($pkg_info) || - $pkg_info['version'] == $pkg_info['installed_version']) { + if (empty($pkg_info) || (!$baseonly && ($pkg_info['version'] == $pkg_info['installed_version']))) { $info = get_pkg_info($meta_pkg); $pkg_name = $meta_pkg; diff --git a/src/usr/local/www/pkg_mgr_install.php b/src/usr/local/www/pkg_mgr_install.php index 5213001f97..134608ea1a 100644 --- a/src/usr/local/www/pkg_mgr_install.php +++ b/src/usr/local/www/pkg_mgr_install.php @@ -100,7 +100,7 @@ if ($_REQUEST['ajax']) { // If this is an ajax call to get the installed and newst versions, call that function, // JSON encode the result, print it and exit if ($_REQUEST['getversion']) { - $firmwareversions = get_system_pkg_version(); + $firmwareversions = get_system_pkg_version(true); print(json_encode($firmwareversions)); exit; }