summaryrefslogtreecommitdiffstats
path: root/meta/classes/archiver.bbclass
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2014-03-24 13:39:26 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-25 09:55:35 +0000
commit4a91e1449b0c869979231b7f4c98e09c7a5d732a (patch)
treea312244c885b17792a28cab19d584ebf20cc7d88 /meta/classes/archiver.bbclass
parent39ea97470fbd5d2aee4d784494d4c5ad157960fb (diff)
downloadpoky-4a91e1449b0c869979231b7f4c98e09c7a5d732a.tar.gz
archiver.bbclass: make it can filter the license
* Filter the license (default: no), the recipe whose license in COPYLEFT_LICENSE_INCLUDE will be included, and in COPYLEFT_LICENSE_EXCLUDE will be excluded. * The user can set the recipe type that would be archived (native, target, and so on), deafult to all. The copyleft_filter.bbclass is come from copyleft_compliance.bbclass, which is used by both copyleft_compliance.bbclass and archiver.bbclass. [YOCTO #5740] (From OE-Core rev: 0e798d5cbcf585535e19633828dc540a282261fc) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/archiver.bbclass')
-rw-r--r--meta/classes/archiver.bbclass27
1 files changed, 25 insertions, 2 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 7780c71ade..9aa9335b94 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -12,9 +12,23 @@
12# 5) The environment data, similar to 'bitbake -e recipe': 12# 5) The environment data, similar to 'bitbake -e recipe':
13# ARCHIVER_MODE[dumpdata] = "1" 13# ARCHIVER_MODE[dumpdata] = "1"
14# 6) The recipe (.bb and .inc): ARCHIVER_MODE[recipe] = "1" 14# 6) The recipe (.bb and .inc): ARCHIVER_MODE[recipe] = "1"
15# 7) Whether output the .src.rpm package:
16# ARCHIVER_MODE[srpm] = "1"
17# 8) Filter the license, the recipe whose license in
18# COPYLEFT_LICENSE_INCLUDE will be included, and in
19# COPYLEFT_LICENSE_EXCLUDE will be excluded.
20# COPYLEFT_LICENSE_INCLUDE = 'GPL* LGPL*'
21# COPYLEFT_LICENSE_EXCLUDE = 'CLOSED Proprietary'
22# 9) The recipe type that will be archived:
23# COPYLEFT_RECIPE_TYPES = 'target'
15# 24#
16# All of the above can be packed into a .src.rpm package: (when PACKAGES != "") 25
17# ARCHIVER_MODE[srpm] = "1" 26# Don't filter the license by default
27COPYLEFT_LICENSE_INCLUDE ?= ''
28COPYLEFT_LICENSE_EXCLUDE ?= ''
29# Create archive for all the recipe types
30COPYLEFT_RECIPE_TYPES ?= 'target native nativesdk cross crosssdk cross-canadian'
31inherit copyleft_filter
18 32
19ARCHIVER_MODE[srpm] ?= "0" 33ARCHIVER_MODE[srpm] ?= "0"
20ARCHIVER_MODE[src] ?= "patched" 34ARCHIVER_MODE[src] ?= "patched"
@@ -38,6 +52,15 @@ do_ar_original[dirs] = "${ARCHIVER_OUTDIR} ${ARCHIVER_WORKDIR}"
38python () { 52python () {
39 pn = d.getVar('PN', True) 53 pn = d.getVar('PN', True)
40 54
55 if d.getVar('COPYLEFT_LICENSE_INCLUDE', True) or \
56 d.getVar('COPYLEFT_LICENSE_EXCLUDE', True):
57 included, reason = copyleft_should_include(d)
58 if not included:
59 bb.debug(1, 'archiver: %s is excluded: %s' % (pn, reason))
60 return
61 else:
62 bb.debug(1, 'archiver: %s is included: %s' % (pn, reason))
63
41 ar_src = d.getVarFlag('ARCHIVER_MODE', 'src', True) 64 ar_src = d.getVarFlag('ARCHIVER_MODE', 'src', True)
42 ar_dumpdata = d.getVarFlag('ARCHIVER_MODE', 'dumpdata', True) 65 ar_dumpdata = d.getVarFlag('ARCHIVER_MODE', 'dumpdata', True)
43 ar_recipe = d.getVarFlag('ARCHIVER_MODE', 'recipe', True) 66 ar_recipe = d.getVarFlag('ARCHIVER_MODE', 'recipe', True)