Commit c6634ee0 authored by Stefano Babic's avatar Stefano Babic
Browse files

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's avatarStefano Babic <sbabic@denx.de>
parent ae3be5af
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment