Openembedded Core Discussions
 help / color / mirror / Atom feed
* [for-dylan][PATCH 1/2] package.bbclass: add LICENSE_EXCLUSION to vardeps
@ 2013-04-18 23:51 Christopher Larson
  2013-04-18 23:51 ` [for-dylan][PATCH 2/2] package.bbclass: ensure license excluded files aren't packaged Christopher Larson
  0 siblings, 1 reply; 2+ messages in thread
From: Christopher Larson @ 2013-04-18 23:51 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

Ensure that changes to INCOMPATIBLE_LICENSE re-run do_package for affected
recipes.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/classes/package.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 2bc31ee..5524816 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1789,6 +1789,10 @@ def gen_packagevar(d):
     for p in pkgs:
         for v in vars:
             ret.append(v + "_" + p)
+
+        # Ensure that changes to INCOMPATIBLE_LICENSE re-run do_package for
+        # affected recipes.
+        ret.append('LICENSE_EXCLUSION-%s' % p)
     return " ".join(ret)
 
 PACKAGE_PREPROCESS_FUNCS ?= ""
-- 
1.8.2




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [for-dylan][PATCH 2/2] package.bbclass: ensure license excluded files aren't packaged
  2013-04-18 23:51 [for-dylan][PATCH 1/2] package.bbclass: add LICENSE_EXCLUSION to vardeps Christopher Larson
@ 2013-04-18 23:51 ` Christopher Larson
  0 siblings, 0 replies; 2+ messages in thread
From: Christopher Larson @ 2013-04-18 23:51 UTC (permalink / raw)
  To: openembedded-core; +Cc: Christopher Larson

From: Christopher Larson <chris_larson@mentor.com>

An excluded package left its files behind, which meant they could end up in
another package instead, meaning we could ship GPLv3 binaries even with GPLv3
in INCOMPATIBLE_LICENSE. Skip the files belonging to the excluded packages to
prevent this from occurring.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
---
 meta/classes/package.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 5524816..1a8da40 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -925,7 +925,7 @@ python populate_packages () {
     for pkg in packages.split():
         if d.getVar('LICENSE_EXCLUSION-' + pkg, True):
             bb.warn("%s has an incompatible license. Excluding from packaging." % pkg)
-        elif pkg in package_list:
+        if pkg in package_list:
             bb.error("%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg)
         else:
             package_list.append(pkg)
@@ -965,6 +965,9 @@ python populate_packages () {
                 continue
             seen.append(file)
 
+            if d.getVar('LICENSE_EXCLUSION-' + pkg, True):
+                continue
+
             def mkdir(src, dest, p):
                 src = os.path.join(src, p)
                 dest = os.path.join(dest, p)
-- 
1.8.2




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-19  0:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-18 23:51 [for-dylan][PATCH 1/2] package.bbclass: add LICENSE_EXCLUSION to vardeps Christopher Larson
2013-04-18 23:51 ` [for-dylan][PATCH 2/2] package.bbclass: ensure license excluded files aren't packaged Christopher Larson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox