summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiaofeng Yan <xiaofeng.yan@windriver.com>2012-03-26 18:49:17 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-26 23:13:19 +0100
commit34c93234ca59e4a31734827aae0c5ebaaab26a1d (patch)
tree9240ab296451254f1177f7fe981e32c60993ef1d
parente4e1162dc5c687acb5135a12012a04c36cd67f3c (diff)
downloadpoky-34c93234ca59e4a31734827aae0c5ebaaab26a1d.tar.gz
src_distribute.bbclass: Remove src__distribute.bbclass
This bbclass has been merged into archiver.bbclass [#YOCTO 1977] (From OE-Core rev: 7a61fc6300a1892e5570352e919f200278153831) Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/src_distribute.bbclass49
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 @@
1SRC_DISTRIBUTECOMMAND[func] = "1"
2python 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
42addtask distribute_sources before do_build after do_fetch
43
44addtask distribute_sources_all after do_distribute_sources
45do_distribute_sources_all[recrdeptask] = "do_distribute_sources"
46do_distribute_sources_all[nostamp] = "1"
47do_distribute_sources_all () {
48 :
49}