appmenus: do not create appmenus for DispVMs (#1123)

Fixes qubesos/qubes-issues#1123
This commit is contained in:
Marek Marczykowski-Górecki 2015-09-03 01:18:16 +02:00
parent 079d0b1060
commit ccd8021af9
2 changed files with 11 additions and 0 deletions

View File

@ -87,6 +87,8 @@ def QubesVm_appmenus_create(self, verbose=False, source_template=None):
if self.internal:
return
if self.is_disposablevm():
return
if self.is_netvm():
vmtype = 'servicevms'
@ -137,6 +139,11 @@ def QubesVm_appicons_create(self, srcdir=None):
if not os.path.exists(srcdir):
return
if self.internal:
return
if self.is_disposablevm():
return
whitelist = os.path.join(self.dir_path, vm_files['appmenus_whitelist'])
if os.path.exists(whitelist):
whitelist = [line.strip() for line in open(whitelist)]
@ -174,6 +181,8 @@ def QubesVm_appicons_cleanup(self):
return
if not os.path.exists(srcdir):
return
if not os.path.exists(self.appmenus_icons_dir):
return
for icon in os.listdir(self.appmenus_icons_dir):
if not os.path.exists(os.path.join(srcdir, icon)):

View File

@ -299,6 +299,8 @@ def main():
print >> sys.stderr, "ERROR: No appmenus received, terminating"
exit(1)
os.umask(002)
if not os.path.exists(vm.appmenus_templates_dir):
os.mkdir(vm.appmenus_templates_dir)