appmenus: retrieve appmenus during template installation

Hardcoded call to qvm-sync-appmenus in template post-install is no
longer used, handle appropriate event.

QubesOS/qubes-issues#2412
This commit is contained in:
Marek Marczykowski-Górecki 2016-11-02 23:29:55 +01:00
parent 90b18a1ec1
commit 4efedd2951
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -482,3 +482,10 @@ class AppmenusExtension(qubes.ext.Extension):
subprocess.call([
'kbuildsycoca' + os.environ.get('KDE_SESSION_VERSION',
'4')])
@qubes.ext.handler('template-postinstall')
def on_template_postinstall(self, vm, event):
import qubesappmenus.receive
new_appmenus = qubesappmenus.receive.retrieve_appmenus_templates(
vm, use_stdin=False)
qubesappmenus.receive.process_appmenus_templates(self, vm, new_appmenus)