Patchwork libx11: skip self if x11 not in DISTRO_FEATURES

login
register
mail settings
Submitter Phil Blundell
Date Aug. 12, 2011, 3:57 p.m.
Message ID <1313164659.6733.163.camel@phil-desktop>
Download mbox | patch
Permalink /patch/9779/
State New, archived
Headers show

Comments

Phil Blundell - Aug. 12, 2011, 3:57 p.m.
This stops (most) x11 packages leaking into a non-x11 distro by mistake.

Signed-off-by: Phil Blundell <philb@gnu.org>
---
 meta/recipes-graphics/xorg-lib/libx11.inc |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
Anders Darander - Aug. 15, 2011, 12:23 p.m.
Although, it is already mergerd by Richard, I really like this patch
series (after testing it).

* Phil Blundell <philb@gnu.org> [110812 17:57]:
> This stops (most) x11 packages leaking into a non-x11 distro by mistake.

Will you submit this to meta-oe also?
This question might apply to a few of the other patches also.

Cheers,
Anders

> Signed-off-by: Phil Blundell <philb@gnu.org>
> ---
>  meta/recipes-graphics/xorg-lib/libx11.inc |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)

> diff --git a/meta/recipes-graphics/xorg-lib/libx11.inc b/meta/recipes-graphics/xorg-lib/libx11.inc
> index c156ce6..455753f 100644
> --- a/meta/recipes-graphics/xorg-lib/libx11.inc
> +++ b/meta/recipes-graphics/xorg-lib/libx11.inc
> @@ -42,3 +42,8 @@ do_compile() {
>  # Multiple libx11 derivatives from from this file and are selected by virtual/libx11
>  # A world build should only build the correct version, not all of them.
>  EXCLUDE_FROM_WORLD = "1"
> +
> +python () {
> +       if not oe.utils.contains ('DISTRO_FEATURES', 'x11', True, False, d):
> +		  raise bb.parse.SkipPackage("X11 not enabled for this DISTRO")
> +}
Phil Blundell - Aug. 15, 2011, 1:07 p.m.
On Mon, 2011-08-15 at 14:23 +0200, Anders Darander wrote:
> Although, it is already mergerd by Richard, I really like this patch
> series (after testing it).
> 
> * Phil Blundell <philb@gnu.org> [110812 17:57]:
> > This stops (most) x11 packages leaking into a non-x11 distro by mistake.
> 
> Will you submit this to meta-oe also?
> This question might apply to a few of the other patches also.

I hadn't planned to (in fact, I hadn't previously realised that meta-oe
had its own copy of those files).  If you think that would be a good
idea then you're obviously welcome to do so, though.

p.
Anders Darander - Aug. 15, 2011, 1:15 p.m.
* Phil Blundell <philb@gnu.org> [110815 15:07]:
> On Mon, 2011-08-15 at 14:23 +0200, Anders Darander wrote:
> > Although, it is already mergerd by Richard, I really like this patch
> > series (after testing it).
> > 
> > * Phil Blundell <philb@gnu.org> [110812 17:57]:
> > > This stops (most) x11 packages leaking into a non-x11 distro by mistake.
> > 
> > Will you submit this to meta-oe also?
> > This question might apply to a few of the other patches also.

> I hadn't planned to (in fact, I hadn't previously realised that meta-oe
> had its own copy of those files).  If you think that would be a good
> idea then you're obviously welcome to do so, though.

Ok, then I'll submit such a patch.

I didn't really this either, until just before lunch, when I found the
reason that e.g. libxcb and libx11 still was being built...

The short-term solution is to get a similar patch applied to meta-oe.
The long-term solution, any volunteers?, would be to convert the
qt4-recipes in meta-to bbappends (if they still are needed).

Cheers,
Anders
Paul Eggleton - Aug. 15, 2011, 1:24 p.m.
On Monday 15 August 2011 14:15:47 Anders Darander wrote:
> The short-term solution is to get a similar patch applied to meta-oe.
> The long-term solution, any volunteers?, would be to convert the
> qt4-recipes in meta-to bbappends (if they still are needed).

I already did this a few weeks ago. The only Qt 4 thing left that is a full 
recipe in meta-oe is qmake2 (for the target).

Cheers,
Paul
Anders Darander - Aug. 15, 2011, 1:32 p.m.
* Paul Eggleton <paul.eggleton@linux.intel.com> [110815 15:24]:
> On Monday 15 August 2011 14:15:47 Anders Darander wrote:
> > The short-term solution is to get a similar patch applied to meta-oe.
> > The long-term solution, any volunteers?, would be to convert the
> > qt4-recipes in meta-to bbappends (if they still are needed).

s/qt4*/libx11/ in this section.

> I already did this a few weeks ago. The only Qt 4 thing left that is a full 
> recipe in meta-oe is qmake2 (for the target).

My apologies... You're of course right, and that change is something I
appreciate (it makes my life a lot simpler).

I've been struggling with a few other qt4-related issues (one or two
RFC-patches will be submitted shortly), that's why I mistakenly wrote
qt4.

I meant libx11 (in xorg-lib) in my last e-mail.

Cheers,
Anders
Paul Eggleton - Aug. 15, 2011, 1:43 p.m.
On Monday 15 August 2011 14:32:59 Anders Darander wrote:
> I've been struggling with a few other qt4-related issues (one or two
> RFC-patches will be submitted shortly), that's why I mistakenly wrote
> qt4.
> 
> I meant libx11 (in xorg-lib) in my last e-mail.

Ah yes, I realised this after sending, no worries :)

I definitely agree, anything that's a duplicated recipe in meta-oe ought to be 
turned into a bbappend. In addition, any newer version in meta-oe of recipes 
in oe-core ought to just be pushed up to oe-core unless there is a really good 
reason to do otherwise.

Cheers,
Paul
Saul Wold - Aug. 22, 2011, 10:32 p.m.
On 08/12/2011 08:57 AM, Phil Blundell wrote:
> This stops (most) x11 packages leaking into a non-x11 distro by mistake.
>
> Signed-off-by: Phil Blundell<philb@gnu.org>
> ---
>   meta/recipes-graphics/xorg-lib/libx11.inc |    5 +++++
>   1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/meta/recipes-graphics/xorg-lib/libx11.inc b/meta/recipes-graphics/xorg-lib/libx11.inc
> index c156ce6..455753f 100644
> --- a/meta/recipes-graphics/xorg-lib/libx11.inc
> +++ b/meta/recipes-graphics/xorg-lib/libx11.inc
> @@ -42,3 +42,8 @@ do_compile() {
>   # Multiple libx11 derivatives from from this file and are selected by virtual/libx11
>   # A world build should only build the correct version, not all of them.
>   EXCLUDE_FROM_WORLD = "1"
> +
> +python () {
> +       if not oe.utils.contains ('DISTRO_FEATURES', 'x11', True, False, d):
> +       	  raise bb.parse.SkipPackage("X11 not enabled for this DISTRO")
> +}

This has been merged, sorry for the response delay

Thanks

Sau!

Patch

diff --git a/meta/recipes-graphics/xorg-lib/libx11.inc b/meta/recipes-graphics/xorg-lib/libx11.inc
index c156ce6..455753f 100644
--- a/meta/recipes-graphics/xorg-lib/libx11.inc
+++ b/meta/recipes-graphics/xorg-lib/libx11.inc
@@ -42,3 +42,8 @@  do_compile() {
 # Multiple libx11 derivatives from from this file and are selected by virtual/libx11
 # A world build should only build the correct version, not all of them.
 EXCLUDE_FROM_WORLD = "1"
+
+python () {
+       if not oe.utils.contains ('DISTRO_FEATURES', 'x11', True, False, d):
+       	  raise bb.parse.SkipPackage("X11 not enabled for this DISTRO")
+}