Use 'qubes.InstallUpdatesGUI' RPC service instead of hardcoded script

It should be up to the VM what software is used for installing updates.

Fixes QubesOS/qubes-issues#1249
This commit is contained in:
Marek Marczykowski-Górecki 2015-11-13 05:42:24 +01:00
parent 3d1cd783ec
commit 0a5a5253b0
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -1378,22 +1378,13 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
subprocess.check_call(
["/usr/bin/qubes-dom0-update", "--clean", "--gui"])
else:
vm_run_common_args = {
'verbose': False,
'autostart': True,
'notify_function': lambda lvl, msg: trayIcon
.showMessage(msg, msecs=3000)}
# 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;" \
"echo Done. Press Enter to exit.; read x"
vm.run("xterm -title update -e sudo sh -c '{}';"
"sudo service qubes-update-check start".
format(update_command),
**vm_run_common_args)
if not vm.is_running():
trayIcon.showMessage(
"Starting the '{0}' VM...".format(vm.name),
msecs=3000)
vm.start()
vm.run_service("qubes.InstallUpdatesGUI", gui=True,
verbose=False, wait=False)
except Exception as ex:
thread_monitor.set_error_msg(str(ex))
thread_monitor.set_finished()