From 87ff52dd03a9130ccecfbed8b08aaaa39c056248 Mon Sep 17 00:00:00 2001 From: HummyPkg Date: Tue, 20 Jun 2017 23:37:31 +0100 Subject: [PATCH] Provide bi-directional dependency information and improve layout --- CONTROL/control | 2 +- webif/cgi-bin/opkg.jim | 24 ++++++++++++++++++++++-- webif/html/pkg/script.js | 2 +- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/CONTROL/control b/CONTROL/control index a444bf1e..12ac4ebc 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.4.2-5 +Version: 1.4.2-6 Architecture: mipsel Maintainer: af123@hpkg.tv Depends: tcpfix,webif-channelicons(>=1.1.25),lighttpd(>=1.4.39-1),jim(>=0.77),jim-oo(>=0.77),jim-sqlite3(>=0.77),jim-cgi(>=0.7-1),jim-binary(>=0.76),service-control(>=2.3),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.6),hmt(>=2.0.10),ssmtp,cron-daemon(>=1.18.3-3),at(>=3.1.18),anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.1.11),webif-charts(>=1.2-1),stripts(>=1.2.5-3),tmenu(>=1.21-2),ffmpeg(>=2.8),id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7),hwctl,nugget(>=0.95),sqlite3(>=3.15.1),jim-xconv diff --git a/webif/cgi-bin/opkg.jim b/webif/cgi-bin/opkg.jim index 218bbce3..2d925a33 100755 --- a/webif/cgi-bin/opkg.jim +++ b/webif/cgi-bin/opkg.jim @@ -14,8 +14,8 @@ proc putsf {str} { flush stdout } -proc opkg {cmd} { - putsf ">>> opkg $cmd" +proc opkg {cmd {silent 0}} { + if {!$silent} { putsf ">>> opkg $cmd" } set bcmd "|/mod/webif/lib/bin/opkg $cmd" set fd [open $bcmd r] while {[gets $fd line] >= 0} { @@ -40,6 +40,26 @@ if {$cmd in $netcmds && ![system connectivity]} { exit } +if {$cmd eq "dependinfo"} { + putsf ">>> What $cmdargs depends on\n" + opkg "depends $cmdargs" 1 + + putsf ">>> What depends on $cmdargs\n" + set bcmd "|/mod/webif/lib/bin/opkg whatdepends $cmdargs" + set fd [open $bcmd r] + while {[gets $fd line] >= 0} { + if {[string match "What depends on root set" $line]} break + } + while {[gets $fd line] >= 0} { + if {[string match "*depends on $cmdargs*" $line]} { + puts "$line" + } + } + close $fd + putsf "" + exit +} + if {$cmd eq "upgrade"} { opkg update } opkg "$cmd $cmdargs" diff --git a/webif/html/pkg/script.js b/webif/html/pkg/script.js index d2c0dbd3..114c4425 100644 --- a/webif/html/pkg/script.js +++ b/webif/html/pkg/script.js @@ -202,7 +202,7 @@ function setup_tab(index, panel) e.preventDefault(); var pkg = $(this).closest('tr').attr('pkg'); stick = true; - execopkg('whatdepends ' + pkg, false); + execopkg('dependinfo ' + pkg, false); }); $(panel).find('tr[pkg=webif]').find('button[action=remove]').disable();