summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-opkg/htdocs/luci-static/resources/view
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-01-04 09:15:49 +0100
committerJo-Philipp Wich <jo@mein.io>2019-01-04 09:15:49 +0100
commit66c2bbc2790813a7889c0dd329131e5012fc83dd (patch)
treec5e82299e7fb614dd2dbe0c3eddf9ace195e3b3b /applications/luci-app-opkg/htdocs/luci-static/resources/view
parente847a93f7817711f927f1481d99e5270fb2aaf30 (diff)
luci-app-opkg: only show packages with higher version in upgrade tab
Fixes #2422. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-opkg/htdocs/luci-static/resources/view')
-rw-r--r--applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js b/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js
index 274a982929..4a36b0a3c3 100644
--- a/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js
+++ b/applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js
@@ -135,7 +135,7 @@ function display(pattern)
if (currentDisplayMode === 'updates') {
var avail = packages.available.pkgs[name];
- if (!avail || avail.version === pkg.version)
+ if (!avail || compareVersion(avail.version, pkg.version) <= 0)
continue;
ver = '%s ยป %s'.format(
@@ -291,6 +291,9 @@ function compareVersion(val, ref)
val = val || '';
ref = ref || '';
+ if (val === ref)
+ return 0;
+
while (vi < val.length || ri < ref.length) {
var first_diff = 0;