diff options
-rw-r--r-- | classes/fsl-eula-unpack.bbclass | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/classes/fsl-eula-unpack.bbclass b/classes/fsl-eula-unpack.bbclass index 03f576e5..9b8f2af6 100644 --- a/classes/fsl-eula-unpack.bbclass +++ b/classes/fsl-eula-unpack.bbclass | |||
@@ -22,25 +22,16 @@ python fsl_bin_do_unpack() { | |||
22 | fetcher = bb.fetch2.Fetch(src_uri, localdata) | 22 | fetcher = bb.fetch2.Fetch(src_uri, localdata) |
23 | 23 | ||
24 | for url in fetcher.ud.values(): | 24 | for url in fetcher.ud.values(): |
25 | save_cwd = os.getcwd() | 25 | # Skip this fetcher if it's not under EULA or if the fetcher type is not supported |
26 | # Check for supported fetchers | 26 | if not url.parm.get('fsl-eula', False) or url.type not in ['http', 'https', 'ftp', 'file']: |
27 | if url.type in ['http', 'https', 'ftp', 'file']: | 27 | continue |
28 | if url.parm.get('fsl-eula', False): | 28 | # If download has failed, do nothing |
29 | # If download has failed, do nothing | 29 | if not os.path.exists(url.localpath): |
30 | if not os.path.exists(url.localpath): | 30 | bb.debug(1, "Exiting as '%s' cannot be found" % url.basename) |
31 | bb.debug(1, "Exiting as '%s' cannot be found" % url.basename) | 31 | return |
32 | return | 32 | bb.note("Handling file '%s' as a Freescale EULA-licensed archive." % url.basename) |
33 | 33 | cmd = "sh %s --auto-accept --force" % (url.localpath) | |
34 | # Change to the working directory | 34 | bb.fetch2.runfetchcmd(cmd, d, quiet=True, workdir=rootdir) |
35 | bb.note("Handling file '%s' as a Freescale's EULA binary." % url.basename) | ||
36 | save_cwd = os.getcwd() | ||
37 | os.chdir(rootdir) | ||
38 | |||
39 | cmd = "sh %s --auto-accept --force" % (url.localpath) | ||
40 | bb.fetch2.runfetchcmd(cmd, d, quiet=True) | ||
41 | |||
42 | # Return to the previous directory | ||
43 | os.chdir(save_cwd) | ||
44 | } | 35 | } |
45 | 36 | ||
46 | python do_unpack() { | 37 | python do_unpack() { |