]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
archiver.bbclass: Add ENABLE_COPYLEFT_FILTER to enable/disable copyleft_filter.bbclass rbt/archiver2
authorRobert Yang <liezhi.yang@windriver.com>
Fri, 15 May 2020 03:49:29 +0000 (11:49 +0800)
committerRobert Yang <liezhi.yang@windriver.com>
Fri, 15 May 2020 09:55:13 +0000 (02:55 -0700)
Set it to 0 can make it archive all the used sources during the build, nothing
will be filtered out, this is useful when we want to archive all the sources.

This equals to:
COPYLEFT_LICENSE_INCLUDE = "*"
COPYLEFT_LICENSE_EXCLUDE = ""

But there are a lot of settings in copyleft_filter.bbclass, so it may not work
when its default settings are changed, add the var ENABLE_COPYLEFT_FILTER will
make it more reliable.

The default value is 1, has no impact by default.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
meta/classes/archiver.bbclass

index 48b4913a9f034c229f37c9720d673d5269f7b282..f4e3478cd0ed1cb7526f0ec8d5b03fb399ce4c54 100644 (file)
@@ -44,6 +44,9 @@
 COPYLEFT_RECIPE_TYPES ?= 'target native nativesdk cross crosssdk cross-canadian'
 inherit copyleft_filter
 
+# Set this to 0 will archive all used sources in the build
+ENABLE_COPYLEFT_FILTER ?= "1"
+
 ARCHIVER_MODE[srpm] ?= "0"
 ARCHIVER_MODE[src] ?= "patched"
 ARCHIVER_MODE[diff] ?= "0"
@@ -81,13 +84,13 @@ python () {
                 pn = p
                 break
 
-    included, reason = copyleft_should_include(d)
-    if not included:
-        bb.debug(1, 'archiver: %s is excluded: %s' % (pn, reason))
-        return
-    else:
-        bb.debug(1, 'archiver: %s is included: %s' % (pn, reason))
-
+    if oe.types.boolean(d.getVar('ENABLE_COPYLEFT_FILTER')):
+        included, reason = copyleft_should_include(d)
+        if not included:
+            bb.debug(1, 'archiver: %s is excluded: %s' % (pn, reason))
+            return
+        else:
+            bb.debug(1, 'archiver: %s is included: %s' % (pn, reason))
 
     # glibc-locale: do_fetch, do_unpack and do_patch tasks have been deleted,
     # so avoid archiving source here.