]> glassweightruler.freedombox.rocks Git - waydroid.git/blobdiff - tools/actions/upgrader.py
lxc: Mount DMA-BUF Heaps
[waydroid.git] / tools / actions / upgrader.py
index 1262637b3f8717b3d29df3ec755198017a223bbb..7f71e1e8fd157b2cd6dbf96ac75eeebdf6286801 100644 (file)
@@ -23,6 +23,7 @@ def migration(args):
             chmod_paths = ["cache_http", "host-permissions", "lxc", "images", "rootfs", "data", "waydroid_base.prop", "waydroid.prop", "waydroid.cfg"]
             tools.helpers.run.user(args, ["chmod", "-R", "g-w,o-w"] + [os.path.join(args.work, f) for f in chmod_paths], check=False)
             tools.helpers.run.user(args, ["chmod", "g-w,o-w", args.work], check=False)
+            os.remove(os.path.join(args.work, "session.cfg"))
     except:
         pass
 
@@ -39,13 +40,14 @@ def upgrade(args):
             container.Stop(False)
         except Exception as e:
             logging.debug(e)
+            tools.actions.container_manager.stop(args)
     migration(args)
     helpers.drivers.loadBinderNodes(args)
     if not args.offline:
         if args.images_path not in tools.config.defaults["preinstalled_images_paths"]:
             helpers.images.get(args)
         else:
-            logging.info("Upgrade refused because a pre-installed image is detected at {}.".format(args.images_path))
+            logging.info("Upgrade refused because Waydroid was configured to load pre-installed image from {}.".format(args.images_path))
     helpers.drivers.probeAshmemDriver(args)
     helpers.lxc.setup_host_perms(args)
     helpers.lxc.set_lxc_config(args)