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