From 22971a5bf82e2913c002b48fd5195792d460af73 Mon Sep 17 00:00:00 2001 From: Hannu Nyman Date: Sat, 2 Nov 2024 13:46:14 +0200 Subject: [PATCH] luci-app-package-manager: fix 'Update lists' button for apk Fix the button "Update lists..." to actually update package lists instead of trying to upgrade all packages when using apk. (No change for opkg.) Note: the package upgrade button remains inactive with apk. It still launches 'apk install' command, which does not work for upgrade. Also remove whitespace from line end. Signed-off-by: Hannu Nyman --- .../root/usr/libexec/package-manager-call | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/applications/luci-app-package-manager/root/usr/libexec/package-manager-call b/applications/luci-app-package-manager/root/usr/libexec/package-manager-call index 789759d40cab..7667b8e8ce59 100755 --- a/applications/luci-app-package-manager/root/usr/libexec/package-manager-call +++ b/applications/luci-app-package-manager/root/usr/libexec/package-manager-call @@ -27,7 +27,7 @@ case "$action" in find "${lists_dir:-/usr/lib/opkg/lists}" -type f '!' -name '*.sig' | xargs -r gzip -cd fi ;; - install|update|remove) + install|update|upgrade|remove) ( cmd="$ipkg_bin" @@ -38,12 +38,15 @@ case "$action" in action="add" ;; update) + action="update" + ;; + upgrade) action="upgrade" ;; remove) action="del" ;; - esac + esac fi # APK have --autoremove enabled by default and @@ -104,7 +107,7 @@ case "$action" in rm -f /tmp/ipkg.lock /tmp/ipkg.err /tmp/ipkg.out ;; *) - echo "Usage: $0 {list-installed|list-available}" >&2 + echo "Usage: $0 {list-installed|list-available|update}" >&2 echo " $0 {install|upgrade|remove} pkg[ pkg...]" >&2 exit 1 ;;