]> glassweightruler.freedombox.rocks Git - waydroid.git/commitdiff
init: Always redownload the image when changing parameters
authorAlessandro Astone <ales.astone@gmail.com>
Sat, 9 Jul 2022 16:53:20 +0000 (18:53 +0200)
committerErfan Abdi <erfangplus@gmail.com>
Wed, 13 Jul 2022 17:02:42 +0000 (21:32 +0430)
When changing system_type, for example.
Timestamps only make sense when compared to the same ota channel.

tools/actions/initializer.py

index b7124d4fe15f156fac06ded68832e294c07a6c9b..158f6bc607499f845713b90912f65ebbe6010f8e 100644 (file)
@@ -73,6 +73,11 @@ def setup_config(args):
             args.vendor_ota = "None"
             args.vendor_type = get_vendor_type(args)
 
             args.vendor_ota = "None"
             args.vendor_type = get_vendor_type(args)
 
+    if args.system_ota != cfg["waydroid"].get("system_ota"):
+        cfg["waydroid"]["system_datetime"] = tools.config.defaults["system_datetime"]
+    if args.vendor_ota != cfg["waydroid"].get("vendor_ota"):
+        cfg["waydroid"]["vendor_datetime"] = tools.config.defaults["vendor_datetime"]
+
     cfg["waydroid"]["vendor_type"] = args.vendor_type
     cfg["waydroid"]["system_ota"] = args.system_ota
     cfg["waydroid"]["vendor_ota"] = args.vendor_ota
     cfg["waydroid"]["vendor_type"] = args.vendor_type
     cfg["waydroid"]["system_ota"] = args.system_ota
     cfg["waydroid"]["vendor_ota"] = args.vendor_ota