dom0: appmenus templates handling for StandaloneVM (#317)
StandaloneVM also needs apps.templates dir in order to qubes-appmenu-select works. Also can be helpful for backup/restore.
This commit is contained in:
parent
c1f0296e66
commit
77ec31d164
@ -789,6 +789,8 @@ class QubesVm(object):
|
||||
try:
|
||||
if source_template is not None:
|
||||
subprocess.check_call ([qubes_appmenu_create_cmd, source_template.appmenus_templates_dir, self.name])
|
||||
elif self.appmenus_templates_dir is not None:
|
||||
subprocess.check_call ([qubes_appmenu_create_cmd, self.appmenus_templates_dir, self.name])
|
||||
else:
|
||||
# Only add apps to menu
|
||||
subprocess.check_call ([qubes_appmenu_create_cmd, "none", self.name, vmtype])
|
||||
@ -1736,6 +1738,12 @@ class QubesAppVm(QubesVm):
|
||||
|
||||
super(QubesAppVm, self).create_on_disk(verbose, source_template=source_template)
|
||||
|
||||
if self.is_updateable():
|
||||
if verbose:
|
||||
print "--> Copying the template's appmenus templates dir:\n{0} ==>\n{1}".\
|
||||
format(source_template.appmenus_templates_dir, self.appmenus_templates_dir)
|
||||
shutil.copytree (source_template.appmenus_templates_dir, self.appmenus_templates_dir)
|
||||
|
||||
if verbose:
|
||||
print "--> Creating icon symlink: {0} -> {1}".format(self.icon_path, self.label.icon_path)
|
||||
os.symlink (self.label.icon_path, self.icon_path)
|
||||
|
Loading…
Reference in New Issue
Block a user