Explorar o código

swupdate class: add a way to add unconditionally files from deploy

Note: this was cherry-picked from:

	 8d49223205c4f65a853e0343273805c17fd6dfee

changing list_for_cpio.append not available in fido.

Signed-off-by: Thomas Gagneret <tgagneret@witekio.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
Thomas Gagneret %!s(int64=9) %!d(string=hai) anos
pai
achega
d9851069ce
Modificáronse 1 ficheiros con 9 adicións e 2 borrados
  1. 9 2
      classes/swupdate.bbclass

+ 9 - 2
classes/swupdate.bbclass

@@ -76,13 +76,20 @@ python do_swuimage () {
         if (filename != 'sw-description'):
             list_for_cpio += " " + filename
 
+# SWUPDATE_IMAGES refers to images in the DEPLOY directory
+# If they are not there, additional file can be added
+# by fetching from URLs
     deploydir = d.getVar('DEPLOY_DIR_IMAGE', True)
 
     for image in images:
-        imagename = image + '-' + d.getVar('MACHINE', True)
         fstypes = (d.getVarFlag("SWUPDATE_IMAGES_FSTYPES", image, True) or "").split()
         for fstype in fstypes:
-            imagebase = image + '-' + d.getVar('MACHINE', True)
+            appendmachine = d.getVarFlag("SWUPDATE_IMAGES_NOAPPEND_MACHINE", image, True)
+            if appendmachine == None:
+                imagebase = image + '-' + d.getVar('MACHINE', True)
+            else:
+                imagebase = image
+
             imagename = imagebase + fstype
             src = os.path.join(deploydir, "%s" % imagename)
             dst = os.path.join(s, "%s" % imagename)