Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 2/4] linux-tools: don't build perf when GPLv3 in INCOMPATIBLE_LICENSE
Date: Wed, 25 Jan 2012 12:31:19 +0000	[thread overview]
Message-ID: <1327494679.19643.221.camel@ted> (raw)
In-Reply-To: <f7bd8523525f541676e8b2e416a4960b45cd7d7e.1327447344.git.josh@linux.intel.com>

On Tue, 2012-01-24 at 15:26 -0800, Joshua Lock wrote:
> As binutils is required by perf to build and is GPLv3 licensed adding
> GPLv3 to INCOMPATIBLE_LICENSE will cause linux-yocto to be skipped.
> 
> Long term we should look at moving perf to a separate recipe but as a
> short term solution this patch will ensure that when GPLv3 is in
> INCOMPATIBLE_LICENSE perf is not built and it's dependencies are not
> added to build.
> 
> Fixes [YOCTO #1880]
> 
> Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
>  meta/recipes-kernel/linux/linux-tools.inc       |   20 ++++++++++++++++++--
>  meta/recipes-kernel/linux/linux-yocto_2.6.37.bb |    2 +-
>  meta/recipes-kernel/linux/linux-yocto_3.0.bb    |    2 +-
>  3 files changed, 20 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/recipes-kernel/linux/linux-tools.inc b/meta/recipes-kernel/linux/linux-tools.inc
> index aa45dba..69e68c0 100644
> --- a/meta/recipes-kernel/linux/linux-tools.inc
> +++ b/meta/recipes-kernel/linux/linux-tools.inc
> @@ -1,5 +1,18 @@
>  # included by kernel recipes if they want to build/provide
>  # perf functionality from their tree.
> +
> +# perf requires binutils which is GPLv3 licensed, don't prevent the entire kernel
> +# being built if GPLv3 is in INCOMPATIBLE_LICENSE
> +python () {
> +    d.setVar("BUILDPERF", "yes")
> +    d.setVar("PERFDEPENDS", "virtual/${MLPREFIX}libc:do_populate_sysroot ${MLPREFIX}elfutils:do_populate_sysroot ${MLPREFIX}binutils:do_populate_sysroot")
> +
> +    if ((d.getVar("INCOMPATIBLE_LICENSE", True) or "").find("GPLv3") != -1):
> +       # GPLv3, drop perf
> +       d.setVar("BUILDPERF", "no")
> +       d.setVar("PERFDEPENDS", "")
> +}
> +

Can we make this a little neater, something like:

BUILDPERF = "yes"
BUILDPERF_libc-uclib = "no"
PERFDEPENDS = "virtual/${MLPREFIX}libc:do_populate_sysroot ${MLPREFIX}elfutils:do_populate_sysroot ${MLPREFIX}binutils:do_populate_sysroot"
PERFDEPENDS_libc-uclibc = ""

Then just have the if statement in the anonymous python and drop the
do_compile_perf_libc-uclibc and PERFDEPENDS_libc-uclibc.

This also makes it easy for an external recipe to just disable this
code.

Cheers,

Richard




  parent reply	other threads:[~2012-01-25 12:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-24 23:26 [PATCH 0/4] Various updates Joshua Lock
2012-01-24 23:26 ` [PATCH 1/4] clutter-gst: update to 1.4.6 Joshua Lock
2012-01-24 23:26 ` [PATCH 2/4] linux-tools: don't build perf when GPLv3 in INCOMPATIBLE_LICENSE Joshua Lock
2012-01-24 23:42   ` Khem Raj
2012-01-24 23:59     ` Saul Wold
2012-01-25  1:04       ` Khem Raj
2012-01-25  1:10         ` Saul Wold
2012-01-25 10:11       ` Andrei Gherzan
2012-01-25 12:31   ` Richard Purdie [this message]
2012-01-24 23:26 ` [PATCH 3/4] cogl: update upstream status for build_for_armv4t.patch Joshua Lock
2012-01-24 23:26 ` [PATCH 4/4] distro-tracking-fields: update entries for clutter-gst-1.8 Joshua Lock
2012-01-25 14:34 ` [PATCH 0/4] Various updates Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1327494679.19643.221.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox