From cfb75f3cba1769ea41fa87b45d2d25237907d228 Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Sat, 2 Apr 2016 15:00:10 +0000 Subject: [PATCH] fixed qubes-core-agent upgrading double package manager lock https://github.com/QubesOS/qubes-issues/issues/1889 --- misc/upgrades-installed-check | 5 +++-- vm-systemd/qubes-update-check.service | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/upgrades-installed-check b/misc/upgrades-installed-check index 443ffdd..e4eabe2 100755 --- a/misc/upgrades-installed-check +++ b/misc/upgrades-installed-check @@ -17,9 +17,10 @@ elif [ -e /etc/debian_version ]; then ## Debian set -e set -o pipefail - apt_get_output="$(LANG="C" apt-get -s upgrade 2>&1)" + apt_get_update_output="$(apt-get -q update 2>&1)" + apt_get_upgrade_output="$(LANG="C" apt-get -s upgrade 2>&1)" exit_code="$?" - echo "$apt_get_output" | awk "/^Inst/{ print $2 }" | [ "$(wc -L)" -eq 0 ] && echo "true" || echo "false" + echo "$apt_get_upgrade_output" | awk "/^Inst/{ print $2 }" | [ "$(wc -L)" -eq 0 ] && echo "true" || echo "false" else echo "Check not implemented for this distribution" >&2 exit 1 diff --git a/vm-systemd/qubes-update-check.service b/vm-systemd/qubes-update-check.service index c3fbe21..afdb29e 100644 --- a/vm-systemd/qubes-update-check.service +++ b/vm-systemd/qubes-update-check.service @@ -5,5 +5,4 @@ After=qubes-qrexec-agent.service [Service] Type=oneshot -ExecStart=/bin/sh -c 'if [ -e /etc/debian_version ]; then apt-get -q update; fi' ExecStart=/usr/lib/qubes/upgrades-status-notify