Skip to content

Commit

Permalink
luci-app-package-manager: fix 'Update lists' button for apk
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
hnyman committed Nov 2, 2024
1 parent 91481d8 commit 22971a5
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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
Expand Down Expand Up @@ -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
;;
Expand Down

0 comments on commit 22971a5

Please sign in to comment.