From 3ba1a990df633a9e0bdbf4abd7e991152503111d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 24 Sep 2015 01:27:32 +0200 Subject: [PATCH] Call yum/apt in xterm to update template (#982) Since GUI updaters are broken, workaround this by starting terminal update in xterm. Not an ideal option, but the proper solution seems to be much more complicated: https://phabricator.whonix.org/T373 QubesOS/qubes-issues#1197 QubesOS/qubes-issues#982 --- qubesmanager/main.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/qubesmanager/main.py b/qubesmanager/main.py index 81b34e4..44f146a 100755 --- a/qubesmanager/main.py +++ b/qubesmanager/main.py @@ -1373,9 +1373,15 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow): 'autostart': True, 'notify_function': lambda lvl, msg: trayIcon .showMessage(msg, msecs=3000)} - vm.run("yum clean expire-cache", user='root', wait=True, - **vm_run_common_args) - vm.run("gpk-update-viewer;service qubes-update-check start -P", + # workaround for broken packagekit (#982) + update_command = "if [ -f /etc/fedora-release ]; then " \ + "yum update; " \ + "else " \ + "apt-get update && apt-get -V dist-upgrade;" \ + "fi" + vm.run("xterm -e sudo sh -c '{}';" + "sudo service qubes-update-check start". + format(update_command), **vm_run_common_args) except Exception as ex: thread_monitor.set_error_msg(str(ex))