summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-opkg/htdocs/luci-static
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-03-03 15:19:21 +0100
committerJo-Philipp Wich <jo@mein.io>2020-03-03 15:21:48 +0100
commit9b25031cb29bd59561e550daccb69935834d7d63 (patch)
tree28f349f51016e2b95caa64221c8927e4bb034e14 /applications/luci-app-opkg/htdocs/luci-static
parent95804e5eaf917b2026f50ec262c3bae711a6b317 (diff)
luci-app-opkg: rework backend operations
Introduce a new /usr/libexec/opkg-call helper and invoke it via cgi-io instead of ubus. This is required to be able to reload rpcd without timing out currently running opkg ubus calls. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-opkg/htdocs/luci-static')
-rw-r--r--applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js10
1 files changed, 4 insertions, 6 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 59ca2cd951..fcb7dc652c 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
@@ -872,7 +872,7 @@ function handleOpkg(ev)
_('Waiting for the <em>opkg %h</em> command to complete…').format(cmd))
]);
- var argv = [ '--force-removal-of-dependent-packages' ];
+ var argv = [ cmd, '--force-removal-of-dependent-packages' ];
if (rem && rem.checked)
argv.push('--autoremove');
@@ -880,12 +880,10 @@ function handleOpkg(ev)
if (owr && owr.checked)
argv.push('--force-overwrite');
- argv.push(cmd);
-
if (pkg != null)
argv.push(pkg);
- fs.exec('/bin/opkg', argv).then(function(res) {
+ fs.exec_direct('/usr/libexec/opkg-call', argv, 'json').then(function(res) {
dlg.removeChild(dlg.lastChild);
if (res.stdout)
@@ -957,8 +955,8 @@ function downloadLists()
{
return Promise.all([
callMountPoints(),
- fs.exec_direct('/usr/libexec/opkg-list', [ 'available' ]),
- fs.exec_direct('/usr/libexec/opkg-list', [ 'installed' ])
+ fs.exec_direct('/usr/libexec/opkg-call', [ 'list-available' ]),
+ fs.exec_direct('/usr/libexec/opkg-call', [ 'list-installed' ])
]);
}