diff --git a/bin/post_sfos-upgrade b/bin/post_sfos-upgrade index aa09682..3be58a1 100644 --- a/bin/post_sfos-upgrade +++ b/bin/post_sfos-upgrade @@ -54,17 +54,27 @@ primuser="$(loginctl list-sessions | fgrep seat0 | tr -s ' ' | cut -d ' ' -f 4)" # Paths for SailfishOS ≥ 2.2.1 rsp. SailfishOS < 2.2.1, see chapter "Final clean up" at https://docs.sailfishos.org/Support/Help_Articles/Updating_Sailfish_OS/#final-clean-up rm -f "/home/${primuser}/.cache/sailfish-osupdateservice/os-info" "/home/${primuser}/.cache/store-client/os-info" +printf '%s\n' "- Cleansing ssu(d)\'s caches and restarting it." +for i in -TERM -INT -TERM -HUP -KILL -Failed_to_kill_ssud +do + if pgrep -x ssud > /dev/null + then eval pkill $i -x ssud + else break + fi + sleep 1 +done +printf '\n' +rm -rf /var/cache/ssu/* +ssu ur + if command -v zypper > /dev/null 2>&1 then # No need to be "brutal": -# printf '%s\n' "- Cleaning zypper's caches:" +# printf '%s\n' "- Cleansing zypper's caches:" # zypper clean -m || exit $? printf '%s\n' "- Refreshing zypper's caches:" zypper refresh || exit $? - printf '\n' - # Syncing, as I could not determine if zypper already does that: - sync - printf '%s\n' "- Checking for updates by zypper:" + printf '\n%s\n' "- Checking for updates by zypper:" # As of SailfishOS 4.1.0, `version --dup` does not seem to always update all packages, any more: zypper update -y -l printf '\n' @@ -75,8 +85,6 @@ fi # Would need to investigate, but refreshing twice will do no harm, anyway. printf '%s\n' "- Refreshing pkcon's caches:" pkcon refresh || exit $? -# Syncing, as I could not determine if pkcon already does that: -sync printf '%s\n' "- Checking for updates by pkcon:" # As of SailfishOS 4.1.0, `version --dup` does not seem to always update all packages, any more: pkcon -y update