aboutsummaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2011-02-25 20:14:35 +0000
committerTom Rini <tom_rini@mentor.com>2011-02-25 12:37:15 -0700
commit6651d6ea9c048e4045ecf7f834a9fe0f41f09566 (patch)
tree5bdbc9427c393dc7218a0a52b1e7fc90d442007b /classes
parent4309c7a1274cc3425c02cb46525dd7bec5b5b683 (diff)
downloadopenembedded-6651d6ea9c048e4045ecf7f834a9fe0f41f09566.tar.gz
src_distribute.bbclass: distribute only SRC_DISTRIBUTE_LICENSES
A distro can require conf/licenses.conf or set SRC_DISTRIBUTE_LICENSES selecting which licenses are wanted to be distributed. In case it is empty or undefined we default to distribute all licenses to not break backward compatibility. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Tom Rini <tom_rini@mentor.com>
Diffstat (limited to 'classes')
-rw-r--r--classes/src_distribute.bbclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/classes/src_distribute.bbclass b/classes/src_distribute.bbclass
index 242d70ceec..f3d3cbacd1 100644
--- a/classes/src_distribute.bbclass
+++ b/classes/src_distribute.bbclass
@@ -16,6 +16,7 @@ python do_distribute_sources () {
dldir = os.path.realpath(d.getVar("DL_DIR", 1) or "")
licenses = (bb.data.getVar('LICENSE', d, 1) or "unknown").split()
+ distribute_licenses = (bb.data.getVar('SRC_DISTRIBUTE_LICENSES', d, 1) or "All").split()
urldatadict = bb.fetch.init(d.getVar("SRC_URI", True).split(), d, True)
src_uri = oe.data.typed_value("SRC_URI", d)
if not src_uri:
@@ -33,8 +34,9 @@ python do_distribute_sources () {
bb.data.setVar('SRC', os.path.abspath(local), d)
for license in licenses:
for entry in license.split("|"):
- bb.data.setVar('LIC', entry, d)
- bb.build.exec_func('SRC_DISTRIBUTECOMMAND', d)
+ if entry in distribute_licenses or "All" in distribute_licenses:
+ bb.data.setVar('LIC', entry, d)
+ bb.build.exec_func('SRC_DISTRIBUTECOMMAND', d)
}
addtask distribute_sources_all after do_distribute_sources