summaryrefslogtreecommitdiffstats
path: root/meta/classes/archiver.bbclass
diff options
context:
space:
mode:
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)