Revert "luci-app-opkg: fix passing wrong option on opkg update/install" openwrt-22.03
authorChristian Marangi <ansuelsmth@gmail.com>
Mon, 28 Oct 2024 10:48:48 +0000 (11:48 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Mon, 28 Oct 2024 10:49:02 +0000 (11:49 +0100)
This reverts commit 4163e3810ac56339aa4baa6a1d072ab8fdd7b15d.

Due to cache problem it's better to revert this minor fixup than adding
a fixup on top of it. For OPKG it doesn't cause any problem as the extra
unsupported options is just ignored.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
applications/luci-app-opkg/htdocs/luci-static/resources/view/opkg.js
applications/luci-app-opkg/root/usr/share/rpcd/acl.d/luci-app-opkg.json

index 7ec781815055f65665b07e2cfab7f86c30c3fc24..f3d0194d97f4077f07fbcc53865c934214bfc5c5 100644 (file)
@@ -983,10 +983,7 @@ function handleOpkg(ev)
                                _('Waiting for the <em>opkg %h</em> command to complete…').format(cmd))
                ]);
 
-               var argv = [ cmd ];
-
-               if (cmd == 'remove')
-                       argv.push('--force-removal-of-dependent-packages')
+               var argv = [ cmd, '--force-removal-of-dependent-packages' ];
 
                if (rem && rem.checked)
                        argv.push('--autoremove');
index 649666c26034b0b7d781e5e258fb3cbff6c8fdcc..d6531a58e44040e18092db6954dc3108f14b0d2c 100644 (file)
                },
                "write": {
                        "file": {
-                               "/usr/libexec/opkg-call install": [ "exec" ],
                                "/usr/libexec/opkg-call install *": [ "exec" ],
                                "/usr/libexec/opkg-call remove *": [ "exec" ],
-                               "/usr/libexec/opkg-call update": [ "exec" ],
+                               "/usr/libexec/opkg-call update *": [ "exec" ],
                                "/etc/opkg.conf": [ "write" ],
                                "/etc/opkg/*.conf": [ "write" ],
                                "/tmp/upload.ipk": [ "write" ]