From dbbd461fb57528174f084142853e32953ca18273 Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Sun, 21 Feb 2021 11:55:08 +0200 Subject: [PATCH] deb-update.bash: add pkcon, rpmconf & needrestart Resolves: #26 Resolves: #27 Resolves: #28 --- bash/deb-update.bash | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/bash/deb-update.bash b/bash/deb-update.bash index 52abdbf..19ed9cb 100755 --- a/bash/deb-update.bash +++ b/bash/deb-update.bash @@ -29,6 +29,11 @@ if hash dnf 2>/dev/null; then dnf "$@" upgrade fi +if hash rpmconf 2>/dev/null; then + # Tests if there are rpmsave/rpmnew files, hopefully is non-interactive + rpmconf -a -t +fi + if hash flatpak 2>/dev/null; then # Flatpak apps are sandboxed and should be safe to update automatically flatpak update --assumeyes @@ -45,6 +50,13 @@ if hash snap 2>/dev/null; then snap changes fi +if hash pkcon 2>/dev/null; then + # So PackageKit using KDE Plasma and possibly GNOME stop alerting about + # already installed updates. It has backends for all other package managers, + # so it needs to be after them. + pkcon refresh force +fi + if hash apt-file 2>/dev/null; then # So the local apt-file database is up-to-date. apt-file update @@ -53,5 +65,11 @@ fi # I don't have flatpak or snap going to background, because I often do # ./deb-update.bash && poweroff +if hash needrestart 2>/dev/null; then + # needrestart batch mode, should be visible on bottom of scrollback + # see https://github.com/liske/needrestart/blob/master/README.batch.md + needrestart -b +fi + # Hide commands being executed again set +x