Browse Source

Merge remote-tracking branch 'origin/pr/267'

* origin/pr/267:
  fix for ArchLinux: notify dom0 about installed updates The launch of the qubes-update-check service failed on ArchLinux, because the qubes-rpc uses the `service` command which isn't available for this OS.
  fix archlinux detection of available upgrades note: checkupdates return 2 when no updates are available (source: man page and source code)
  upgrades-installed-check requires pacman-contrib for checkupdates
Marek Marczykowski-Górecki 3 years ago
parent
commit
f95f08e15f

+ 1 - 1
archlinux/PKGBUILD

@@ -61,7 +61,7 @@ package_qubes-vm-core() {
              gnome-packagekit imagemagick fakeroot notification-daemon dconf
              zenity qubes-libvchan qubes-db-vm haveged python-gobject
              python-dbus xdg-utils notification-daemon gawk sed procps-ng librsvg
-             socat
+             socat pacman-contrib
              )
     optdepends=(gnome-keyring gnome-settings-daemon python-nautilus gpk-update-viewer qubes-vm-networking qubes-vm-keyring)
     install=PKGBUILD.install

+ 2 - 1
package-managers/upgrades-installed-check

@@ -34,7 +34,8 @@ elif [ -e /etc/arch-release ]; then
     set -o pipefail
     checkupdates_output="$(checkupdates 2>&1)"
     exit_code="$?"
-    echo "$checkupdates_output" | grep -qF -- '->' && echo "false" || echo "true"
+    [ "$exit_code" -eq 2 ] && echo "true" && exit 0
+    echo "false"
 elif [ -e /etc/gentoo-release ]; then
     ## Gentoo
     set -e

+ 5 - 1
qubes-rpc/qubes.InstallUpdatesGUI

@@ -20,4 +20,8 @@ fi
 xterm -title update -e su -s /bin/sh -l -c "$update_cmd; echo Done.; test -f /var/run/qubes/this-is-templatevm && { echo Press Enter to shutdown the template, or Ctrl-C to just close this window; read x && poweroff; } ;"
 
 # Notify dom0 about installed updates
-su -s /bin/sh -c 'service qubes-update-check start'
+if [ -e /etc/arch-release ]; then
+    su -s /bin/sh -c 'systemctl start qubes-update-check'
+else
+    su -s /bin/sh -c 'service qubes-update-check start'
+fi