Parcourir la source

Toggle installed_by_rpm in template tool

Christopher Laprise il y a 6 ans
Parent
commit
f7d27cdcdc
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      qubesadmin/tools/qvm_template_postprocess.py

+ 2 - 0
qubesadmin/tools/qvm_template_postprocess.py

@@ -205,6 +205,7 @@ def post_install(args):
         # if data import fails, remove half-created VM
         del app.domains[vm.name]
         raise
+    vm.installed_by_rpm = True
     import_appmenus(vm, args.dir)
 
     if not args.skip_start:
@@ -226,6 +227,7 @@ def pre_remove(args):
     for appvm in tpl.appvms:
         parser.error('Qube {} uses this template'.format(appvm.name))
 
+    tpl.installed_by_rpm = False
     del app.domains[args.name]
     return 0