Skip to content

Commit

Permalink
fix bug: update to packages file leaves app uninstalled
Browse files Browse the repository at this point in the history
Scenario: packages file is changed, with packages added or removed. The
app needs to be reinstalled. First manage uninstalls it, then the new
app folder is copied to the main pi-apps/apps/ directory. Now the
packages files match each other, so will_reinstall will now return 1,
causing manage to skip install.
Solution: only let this workaround skip an app uninstall.
  • Loading branch information
Botspot committed Mar 24, 2024
1 parent ca47e31 commit f52356f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manage
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ elif [ "$1" == 'install' ] || [ "$1" == 'uninstall' ];then
#fix edge case: new will_reinstall function avoids a reinstall if packages to install do not change.
#unfortunately updater script does not source the new api so chromium is being reinstalled after we added "| chromium" to the packages file.
#fix it here because new manage script sources the new api
if [ "$3" == "update" ] && ! will_reinstall "$app" ;then
if [ "$action" == uninstall ] && [ "$3" == "update" ] && ! will_reinstall "$app" ;then
#manage was told to reinstall app, but it does not actually need to. Do nothing
appscript=(bash -c -o pipefail "status 'Not reinstalling $app as no changes would be made.\nYou should only see this message once. Exiting.'")
fi
Expand Down

0 comments on commit f52356f

Please sign in to comment.