* [PATCH] package: Fix license exclusion packaging errors
@ 2015-04-29 13:23 Richard Purdie
2015-04-29 15:42 ` Khem Raj
0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2015-04-29 13:23 UTC (permalink / raw)
To: openembedded-core
Currently the license exclusion code removes packages from PACKAGES
pre population of the package directories. This means that the FILES
entries for some packages are not seen and invariably results in
packaging errors.
Instead, remove the packages from PACKAGES post population of the packages
so the usual FILES entries work as expected but the file are not placed
into any packages and no packages containing embargoed licenses are generated.
This avoids errors from gcc-runtime with GPLv3 exclusion like:
ERROR: QA Issue: gcc-runtime: Files/directories were installed but not shipped in any package:
/usr/share
/usr/src
/usr/share/gcc-4.9.2
/usr/share/gcc-4.9.2/python
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install. [installed-vs-shipped]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 5ece69e..a76e6e9 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1041,14 +1041,11 @@ python populate_packages () {
bb.utils.mkdirhier(outdir)
os.chdir(dvar)
- # Sanity check PACKAGES for duplicates and for LICENSE_EXCLUSION
+ # Sanity check PACKAGES for duplicates
# Sanity should be moved to sanity.bbclass once we have the infrastucture
package_list = []
for pkg in packages.split():
- if d.getVar('LICENSE_EXCLUSION-' + pkg, True):
- msg = "%s has an incompatible license. Excluding from packaging." % pkg
- package_qa_handle_error("incompatible-license", msg, d)
if pkg in package_list:
msg = "%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg
package_qa_handle_error("packages-list", msg, d)
@@ -1082,9 +1079,6 @@ 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)
@@ -1125,6 +1119,16 @@ python populate_packages () {
os.umask(oldumask)
os.chdir(workdir)
+ # Handle LICENSE_EXCLUSION
+ package_list = []
+ for pkg in packages.split():
+ if d.getVar('LICENSE_EXCLUSION-' + pkg, True):
+ msg = "%s has an incompatible license. Excluding from packaging." % pkg
+ package_qa_handle_error("incompatible-license", msg, d)
+ else:
+ package_list.append(pkg)
+ d.setVar('PACKAGES', ' '.join(package_list))
+
unshipped = []
for root, dirs, files in cpath.walk(dvar):
dir = root[len(dvar):]
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] package: Fix license exclusion packaging errors
2015-04-29 13:23 [PATCH] package: Fix license exclusion packaging errors Richard Purdie
@ 2015-04-29 15:42 ` Khem Raj
0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2015-04-29 15:42 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
> On Apr 29, 2015, at 6:23 AM, Richard Purdie <richard.purdie@linuxfoundation.org> wrote:
>
> Currently the license exclusion code removes packages from PACKAGES
> pre population of the package directories. This means that the FILES
> entries for some packages are not seen and invariably results in
> packaging errors.
>
> Instead, remove the packages from PACKAGES post population of the packages
> so the usual FILES entries work as expected but the file are not placed
> into any packages and no packages containing embargoed licenses are generated.
>
> This avoids errors from gcc-runtime with GPLv3 exclusion like:
>
> ERROR: QA Issue: gcc-runtime: Files/directories were installed but not shipped in any package:
> /usr/share
> /usr/src
> /usr/share/gcc-4.9.2
> /usr/share/gcc-4.9.2/python
> Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install. [installed-vs-shipped]
>
I am seeing exact issues with cairo as well. This seems to fix it so looks ok
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-29 15:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-29 13:23 [PATCH] package: Fix license exclusion packaging errors Richard Purdie
2015-04-29 15:42 ` Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.