Forráskód Böngészése

classes/swupdate-common.bbclass: Add SRC_URI exclusions

Adds a variable which can be used to exclude specific files in SRC_URI
from being placed in the CPIO archive. This can be useful if a recipe
has extra actions it takes based on SRC_URI files, but doesn't want to
have those files in the CPIO archive (e.g. expanding a sw-description
using Jinja2 templates).

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Joshua Watt 2 éve
szülő
commit
43afaac5da
1 módosított fájl, 3 hozzáadás és 0 törlés
  1. 3 0
      classes-recipe/swupdate-common.bbclass

+ 3 - 0
classes-recipe/swupdate-common.bbclass

@@ -215,6 +215,7 @@ def swupdate_add_src_uri(d, list_for_cpio):
     import shutil
 
     s = d.getVar('S', True)
+    exclude = (d.getVar("SWUPDATE_SRC_URI_EXCLUDE") or "").split()
 
     fetch = bb.fetch2.Fetch([], d)
 
@@ -222,6 +223,8 @@ def swupdate_add_src_uri(d, list_for_cpio):
     for url in fetch.urls:
         local = fetch.localpath(url)
         filename = os.path.basename(local)
+        if filename in exclude:
+            continue
         aes_file = d.getVar('SWUPDATE_AES_FILE', True)
         if aes_file:
             key,iv = swupdate_extract_keys(d.getVar('SWUPDATE_AES_FILE', True))