Selaa lähdekoodia

Check for fetched URLs before adding to SWU

There are cases where the fetched URLs are retrieved from a repo. Files
cannot be copied as they are and must be evaluated in the recipe. IOne
use case is if the sw-description is fetched from a git repo instead of
beeing stored on a local file. The check vrifies that the fetched URL is
a file before copying it.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Stefano Babic 6 vuotta sitten
vanhempi
commit
c6634ee074
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      classes/swupdate.bbclass

+ 1 - 1
classes/swupdate.bbclass

@@ -98,7 +98,7 @@ python do_swuimage () {
     for url in fetch.urls:
         local = fetch.localpath(url)
         filename = os.path.basename(local)
-        if (filename != 'sw-description'):
+        if (filename != 'sw-description') and (os.path.isfile(filename)):
             shutil.copyfile(local, os.path.join(s, "%s" % filename ))
             list_for_cpio.append(filename)