diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/src_distribute.bbclass | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/meta/classes/src_distribute.bbclass b/meta/classes/src_distribute.bbclass deleted file mode 100644 index efa2720e23..0000000000 --- a/meta/classes/src_distribute.bbclass +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | SRC_DISTRIBUTECOMMAND[func] = "1" | ||
2 | python do_distribute_sources () { | ||
3 | l = bb.data.createCopy(d) | ||
4 | bb.data.update_data(l) | ||
5 | |||
6 | sources_dir = d.getVar('SRC_DISTRIBUTEDIR', True) | ||
7 | src_uri = d.getVar('SRC_URI', True).split() | ||
8 | fetcher = bb.fetch2.Fetch(src_uri, d) | ||
9 | ud = fetcher.ud | ||
10 | |||
11 | licenses = d.getVar('LICENSE', True).replace('&', '|') | ||
12 | licenses = licenses.replace('(', '').replace(')', '') | ||
13 | clean_licenses = "" | ||
14 | for x in licenses.split(): | ||
15 | if x.strip() == '' or x == 'CLOSED': | ||
16 | continue | ||
17 | |||
18 | if x != "|": | ||
19 | clean_licenses += x | ||
20 | |||
21 | for license in clean_licenses.split('|'): | ||
22 | for url in ud.values(): | ||
23 | cmd = d.getVar('SRC_DISTRIBUTECOMMAND', True) | ||
24 | if not cmd: | ||
25 | raise bb.build.FuncFailed("Unable to distribute sources, SRC_DISTRIBUTECOMMAND not defined") | ||
26 | url.setup_localpath(d) | ||
27 | d.setVar('SRC', url.localpath) | ||
28 | if url.type == 'file': | ||
29 | if url.basename == '*': | ||
30 | import os.path | ||
31 | dest_dir = os.path.basename(os.path.dirname(os.path.abspath(url.localpath))) | ||
32 | d.setVar('DEST', "%s_%s/" % (d.getVar('PF', True), dest_dir)) | ||
33 | else: | ||
34 | d.setVar('DEST', "%s_%s" % (d.getVar('PF', True), url.basename)) | ||
35 | else: | ||
36 | d.setVar('DEST', '') | ||
37 | |||
38 | d.setVar('SRC_DISTRIBUTEDIR', "%s/%s" % (sources_dir, license)) | ||
39 | bb.build.exec_func('SRC_DISTRIBUTECOMMAND', d) | ||
40 | } | ||
41 | |||
42 | addtask distribute_sources before do_build after do_fetch | ||
43 | |||
44 | addtask distribute_sources_all after do_distribute_sources | ||
45 | do_distribute_sources_all[recrdeptask] = "do_distribute_sources" | ||
46 | do_distribute_sources_all[nostamp] = "1" | ||
47 | do_distribute_sources_all () { | ||
48 | : | ||
49 | } | ||