diff mbox series

[[meta-swupdate] PATCH ] BUG: fix regression introduced by 534cf5d5968e713

Message ID 20210906092150.26606-1-sbabic@denx.de
State Accepted
Headers show
Series [[meta-swupdate] PATCH ] BUG: fix regression introduced by 534cf5d5968e713 | expand

Commit Message

Stefano Babic Sept. 6, 2021, 9:21 a.m. UTC
The encryption part in the commion class does not work anymore due to
the missing access to variables' database.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 classes/swupdate-common.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/classes/swupdate-common.bbclass b/classes/swupdate-common.bbclass
index cbd86ca..dabd466 100644
--- a/classes/swupdate-common.bbclass
+++ b/classes/swupdate-common.bbclass
@@ -296,7 +296,7 @@  def swupdate_add_src_uri(d, list_for_cpio):
                 shutil.copyfile(local, dst)
             list_for_cpio.append(filename)
 
-def add_image_to_swu(deploydir, imagename, s, encrypt, list_for_cpio):
+def add_image_to_swu(d, deploydir, imagename, s, encrypt, list_for_cpio):
     import shutil
 
     src = os.path.join(deploydir, imagename)
@@ -334,13 +334,13 @@  def swupdate_add_artifacts(d, list_for_cpio):
             for fstype in fstypes:
                 image_found = False
                 for imagebase in imagebases:
-                    image_found = add_image_to_swu(deploydir, imagebase + fstype, s, encrypted, list_for_cpio)
+                    image_found = add_image_to_swu(d, deploydir, imagebase + fstype, s, encrypted, list_for_cpio)
                     if image_found:
                         break
                 if not image_found:
                     bb.fatal("swupdate cannot find image file: %s" % os.path.join(deploydir, imagebase + fstype))
         else:  # Allow also complete entries like "image.ext4.gz" in SWUPDATE_IMAGES
-            if not add_image_to_swu(deploydir, image, s, encrypted, list_for_cpio):
+            if not add_image_to_swu(d, deploydir, image, s, encrypted, list_for_cpio):
                 bb.fatal("swupdate cannot find %s image file" % image)