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:
parent
3d1cd783ec
commit
0a5a5253b0
@ -1378,22 +1378,13 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
|||||||
subprocess.check_call(
|
subprocess.check_call(
|
||||||
["/usr/bin/qubes-dom0-update", "--clean", "--gui"])
|
["/usr/bin/qubes-dom0-update", "--clean", "--gui"])
|
||||||
else:
|
else:
|
||||||
vm_run_common_args = {
|
if not vm.is_running():
|
||||||
'verbose': False,
|
trayIcon.showMessage(
|
||||||
'autostart': True,
|
"Starting the '{0}' VM...".format(vm.name),
|
||||||
'notify_function': lambda lvl, msg: trayIcon
|
msecs=3000)
|
||||||
.showMessage(msg, msecs=3000)}
|
vm.start()
|
||||||
# workaround for broken packagekit (#982)
|
vm.run_service("qubes.InstallUpdatesGUI", gui=True,
|
||||||
update_command = "if [ -f /etc/fedora-release ]; then " \
|
verbose=False, wait=False)
|
||||||
"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)
|
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
thread_monitor.set_error_msg(str(ex))
|
thread_monitor.set_error_msg(str(ex))
|
||||||
thread_monitor.set_finished()
|
thread_monitor.set_finished()
|
||||||
|
Loading…
Reference in New Issue
Block a user