Patchwork [2/4] dbus: Drop libx11 dependency when building without 'x11' distro feature

login
register
mail settings
Submitter Otavio Salvador
Date Feb. 16, 2013, 9:20 p.m.
Message ID <1361049644-27904-2-git-send-email-otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/44723/
State New
Headers show

Comments

Otavio Salvador - Feb. 16, 2013, 9:20 p.m.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta/recipes-core/dbus/dbus.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Richard Purdie - Feb. 17, 2013, 7:47 a.m.
On Sat, 2013-02-16 at 19:20 -0200, Otavio Salvador wrote:
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>  meta/recipes-core/dbus/dbus.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
> index 292ab29..cebab28 100644
> --- a/meta/recipes-core/dbus/dbus.inc
> +++ b/meta/recipes-core/dbus/dbus.inc
> @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
>  X11DEPENDS = "virtual/libx11 libsm"
>  DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
>  DEPENDS_class-native = "expat-native virtual/libintl-native"
> -DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl virtual/libx11"
> +DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl ${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)}"
>  RDEPENDS_dbus = "${@base_contains('DISTRO_FEATURES', 'ptest', 'dbus-ptest', '', d)}"
>  RDEPENDS_class-native = ""

This tends to be a really bad idea for dbus-nativesdk. If you install an
SDK compiled with these options into PATH only a system which does have
x11, it will break functionality in a way unacceptable to users.

I'm not sure we should ever ship dbus-launch with the SDK so perhaps we
should just delete it like we now do for the -native version, then we
could drop the x11 requirement in all cases.

Cheers,

Richard
Otavio Salvador - Feb. 17, 2013, 1:40 p.m.
On Sun, Feb 17, 2013 at 4:47 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Sat, 2013-02-16 at 19:20 -0200, Otavio Salvador wrote:
>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> ---
>>  meta/recipes-core/dbus/dbus.inc | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
>> index 292ab29..cebab28 100644
>> --- a/meta/recipes-core/dbus/dbus.inc
>> +++ b/meta/recipes-core/dbus/dbus.inc
>> @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
>>  X11DEPENDS = "virtual/libx11 libsm"
>>  DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
>>  DEPENDS_class-native = "expat-native virtual/libintl-native"
>> -DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl virtual/libx11"
>> +DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl ${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)}"
>>  RDEPENDS_dbus = "${@base_contains('DISTRO_FEATURES', 'ptest', 'dbus-ptest', '', d)}"
>>  RDEPENDS_class-native = ""
>
> This tends to be a really bad idea for dbus-nativesdk. If you install an
> SDK compiled with these options into PATH only a system which does have
> x11, it will break functionality in a way unacceptable to users.

I don't see how it'd break anything being deployed in a toolchain. We
don't initialize the dbus daemon so it is mostly used to fulfill
dependencies.

> I'm not sure we should ever ship dbus-launch with the SDK so perhaps we
> should just delete it like we now do for the -native version, then we
> could drop the x11 requirement in all cases.

That could be an option (ignore x11 feature for nativesdk) and it does
make some sense.
Richard Purdie - Feb. 17, 2013, 1:44 p.m.
On Sun, 2013-02-17 at 10:40 -0300, Otavio Salvador wrote:
> On Sun, Feb 17, 2013 at 4:47 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > On Sat, 2013-02-16 at 19:20 -0200, Otavio Salvador wrote:
> >> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> >> ---
> >>  meta/recipes-core/dbus/dbus.inc | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
> >> index 292ab29..cebab28 100644
> >> --- a/meta/recipes-core/dbus/dbus.inc
> >> +++ b/meta/recipes-core/dbus/dbus.inc
> >> @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
> >>  X11DEPENDS = "virtual/libx11 libsm"
> >>  DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
> >>  DEPENDS_class-native = "expat-native virtual/libintl-native"
> >> -DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl virtual/libx11"
> >> +DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl ${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)}"
> >>  RDEPENDS_dbus = "${@base_contains('DISTRO_FEATURES', 'ptest', 'dbus-ptest', '', d)}"
> >>  RDEPENDS_class-native = ""
> >
> > This tends to be a really bad idea for dbus-nativesdk. If you install an
> > SDK compiled with these options into PATH only a system which does have
> > x11, it will break functionality in a way unacceptable to users.
> 
> I don't see how it'd break anything being deployed in a toolchain. We
> don't initialize the dbus daemon so it is mostly used to fulfill
> dependencies.

Imagine you source the toolchain setup script. The limited functionality
dbus-launch just got into PATH. Now you run some X application. Things
break.

Cheers,

Richard
Otavio Salvador - Feb. 17, 2013, 1:55 p.m.
On Sun, Feb 17, 2013 at 10:44 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Sun, 2013-02-17 at 10:40 -0300, Otavio Salvador wrote:
>> On Sun, Feb 17, 2013 at 4:47 AM, Richard Purdie
>> <richard.purdie@linuxfoundation.org> wrote:
>> > On Sat, 2013-02-16 at 19:20 -0200, Otavio Salvador wrote:
>> >> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> >> ---
>> >>  meta/recipes-core/dbus/dbus.inc | 2 +-
>> >>  1 file changed, 1 insertion(+), 1 deletion(-)
>> >>
>> >> diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
>> >> index 292ab29..cebab28 100644
>> >> --- a/meta/recipes-core/dbus/dbus.inc
>> >> +++ b/meta/recipes-core/dbus/dbus.inc
>> >> @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
>> >>  X11DEPENDS = "virtual/libx11 libsm"
>> >>  DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
>> >>  DEPENDS_class-native = "expat-native virtual/libintl-native"
>> >> -DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl virtual/libx11"
>> >> +DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl ${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)}"
>> >>  RDEPENDS_dbus = "${@base_contains('DISTRO_FEATURES', 'ptest', 'dbus-ptest', '', d)}"
>> >>  RDEPENDS_class-native = ""
>> >
>> > This tends to be a really bad idea for dbus-nativesdk. If you install an
>> > SDK compiled with these options into PATH only a system which does have
>> > x11, it will break functionality in a way unacceptable to users.
>>
>> I don't see how it'd break anything being deployed in a toolchain. We
>> don't initialize the dbus daemon so it is mostly used to fulfill
>> dependencies.
>
> Imagine you source the toolchain setup script. The limited functionality
> dbus-launch just got into PATH. Now you run some X application. Things
> break.

You usually to not source the env script and run your X server on top
of it, I think. Personally I source it in a terminal session inside of
X and use it to build things only.
Richard Purdie - Feb. 17, 2013, 2:48 p.m.
On Sun, 2013-02-17 at 10:55 -0300, Otavio Salvador wrote:
> On Sun, Feb 17, 2013 at 10:44 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > On Sun, 2013-02-17 at 10:40 -0300, Otavio Salvador wrote:
> >> On Sun, Feb 17, 2013 at 4:47 AM, Richard Purdie
> >> <richard.purdie@linuxfoundation.org> wrote:
> >> > On Sat, 2013-02-16 at 19:20 -0200, Otavio Salvador wrote:
> >> >> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> >> >> ---
> >> >>  meta/recipes-core/dbus/dbus.inc | 2 +-
> >> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >> >>
> >> >> diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
> >> >> index 292ab29..cebab28 100644
> >> >> --- a/meta/recipes-core/dbus/dbus.inc
> >> >> +++ b/meta/recipes-core/dbus/dbus.inc
> >> >> @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
> >> >>  X11DEPENDS = "virtual/libx11 libsm"
> >> >>  DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
> >> >>  DEPENDS_class-native = "expat-native virtual/libintl-native"
> >> >> -DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl virtual/libx11"
> >> >> +DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl ${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)}"
> >> >>  RDEPENDS_dbus = "${@base_contains('DISTRO_FEATURES', 'ptest', 'dbus-ptest', '', d)}"
> >> >>  RDEPENDS_class-native = ""
> >> >
> >> > This tends to be a really bad idea for dbus-nativesdk. If you install an
> >> > SDK compiled with these options into PATH only a system which does have
> >> > x11, it will break functionality in a way unacceptable to users.
> >>
> >> I don't see how it'd break anything being deployed in a toolchain. We
> >> don't initialize the dbus daemon so it is mostly used to fulfill
> >> dependencies.
> >
> > Imagine you source the toolchain setup script. The limited functionality
> > dbus-launch just got into PATH. Now you run some X application. Things
> > break.
> 
> You usually to not source the env script and run your X server on top
> of it, I think. Personally I source it in a terminal session inside of
> X and use it to build things only.

No, but people do open a terminal in X and then source the script there,
then run other X applications from within the terminal window. Those X
applications can use dbus activation. A dbus-launch without x11 support
causes problems in this situation.

Cheers,

Richard
Otavio Salvador - Feb. 17, 2013, 2:52 p.m.
On Sun, Feb 17, 2013 at 11:48 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Sun, 2013-02-17 at 10:55 -0300, Otavio Salvador wrote:
>> On Sun, Feb 17, 2013 at 10:44 AM, Richard Purdie
>> <richard.purdie@linuxfoundation.org> wrote:
>> > On Sun, 2013-02-17 at 10:40 -0300, Otavio Salvador wrote:
>> >> On Sun, Feb 17, 2013 at 4:47 AM, Richard Purdie
>> >> <richard.purdie@linuxfoundation.org> wrote:
>> >> > On Sat, 2013-02-16 at 19:20 -0200, Otavio Salvador wrote:
>> >> >> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> >> >> ---
>> >> >>  meta/recipes-core/dbus/dbus.inc | 2 +-
>> >> >>  1 file changed, 1 insertion(+), 1 deletion(-)
>> >> >>
>> >> >> diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
>> >> >> index 292ab29..cebab28 100644
>> >> >> --- a/meta/recipes-core/dbus/dbus.inc
>> >> >> +++ b/meta/recipes-core/dbus/dbus.inc
>> >> >> @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
>> >> >>  X11DEPENDS = "virtual/libx11 libsm"
>> >> >>  DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
>> >> >>  DEPENDS_class-native = "expat-native virtual/libintl-native"
>> >> >> -DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl virtual/libx11"
>> >> >> +DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl ${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)}"
>> >> >>  RDEPENDS_dbus = "${@base_contains('DISTRO_FEATURES', 'ptest', 'dbus-ptest', '', d)}"
>> >> >>  RDEPENDS_class-native = ""
>> >> >
>> >> > This tends to be a really bad idea for dbus-nativesdk. If you install an
>> >> > SDK compiled with these options into PATH only a system which does have
>> >> > x11, it will break functionality in a way unacceptable to users.
>> >>
>> >> I don't see how it'd break anything being deployed in a toolchain. We
>> >> don't initialize the dbus daemon so it is mostly used to fulfill
>> >> dependencies.
>> >
>> > Imagine you source the toolchain setup script. The limited functionality
>> > dbus-launch just got into PATH. Now you run some X application. Things
>> > break.
>>
>> You usually to not source the env script and run your X server on top
>> of it, I think. Personally I source it in a terminal session inside of
>> X and use it to build things only.
>
> No, but people do open a terminal in X and then source the script there,
> then run other X applications from within the terminal window. Those X
> applications can use dbus activation. A dbus-launch without x11 support
> causes problems in this situation.

Yes; got it.

So your idea is to avoid x11 dependency altogether and drop
dbus-launch to avoid this errors?
Richard Purdie - Feb. 17, 2013, 3:10 p.m.
On Sun, 2013-02-17 at 11:52 -0300, Otavio Salvador wrote:
> On Sun, Feb 17, 2013 at 11:48 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > On Sun, 2013-02-17 at 10:55 -0300, Otavio Salvador wrote:
> >> On Sun, Feb 17, 2013 at 10:44 AM, Richard Purdie
> >> <richard.purdie@linuxfoundation.org> wrote:
> >> > On Sun, 2013-02-17 at 10:40 -0300, Otavio Salvador wrote:
> >> >> On Sun, Feb 17, 2013 at 4:47 AM, Richard Purdie
> >> >> <richard.purdie@linuxfoundation.org> wrote:
> >> >> > On Sat, 2013-02-16 at 19:20 -0200, Otavio Salvador wrote:
> >> >> >> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> >> >> >> ---
> >> >> >>  meta/recipes-core/dbus/dbus.inc | 2 +-
> >> >> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >> >> >>
> >> >> >> diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
> >> >> >> index 292ab29..cebab28 100644
> >> >> >> --- a/meta/recipes-core/dbus/dbus.inc
> >> >> >> +++ b/meta/recipes-core/dbus/dbus.inc
> >> >> >> @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
> >> >> >>  X11DEPENDS = "virtual/libx11 libsm"
> >> >> >>  DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
> >> >> >>  DEPENDS_class-native = "expat-native virtual/libintl-native"
> >> >> >> -DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl virtual/libx11"
> >> >> >> +DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl ${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)}"
> >> >> >>  RDEPENDS_dbus = "${@base_contains('DISTRO_FEATURES', 'ptest', 'dbus-ptest', '', d)}"
> >> >> >>  RDEPENDS_class-native = ""
> >> >> >
> >> >> > This tends to be a really bad idea for dbus-nativesdk. If you install an
> >> >> > SDK compiled with these options into PATH only a system which does have
> >> >> > x11, it will break functionality in a way unacceptable to users.
> >> >>
> >> >> I don't see how it'd break anything being deployed in a toolchain. We
> >> >> don't initialize the dbus daemon so it is mostly used to fulfill
> >> >> dependencies.
> >> >
> >> > Imagine you source the toolchain setup script. The limited functionality
> >> > dbus-launch just got into PATH. Now you run some X application. Things
> >> > break.
> >>
> >> You usually to not source the env script and run your X server on top
> >> of it, I think. Personally I source it in a terminal session inside of
> >> X and use it to build things only.
> >
> > No, but people do open a terminal in X and then source the script there,
> > then run other X applications from within the terminal window. Those X
> > applications can use dbus activation. A dbus-launch without x11 support
> > causes problems in this situation.
> 
> Yes; got it.
> 
> So your idea is to avoid x11 dependency altogether and drop
> dbus-launch to avoid this errors?

Yes, I did the same thing with dbus-native for exactly this reason (e.g.
X apps from within a devshell). I didn't touch dbus-nativesdk since it
has the X dependency and I didn't think it was bothering anyone.

Cheers,

Richard
Otavio Salvador - Feb. 17, 2013, 3:31 p.m.
On Sun, Feb 17, 2013 at 12:10 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Sun, 2013-02-17 at 11:52 -0300, Otavio Salvador wrote:
>> On Sun, Feb 17, 2013 at 11:48 AM, Richard Purdie
>> <richard.purdie@linuxfoundation.org> wrote:
>> > On Sun, 2013-02-17 at 10:55 -0300, Otavio Salvador wrote:
>> >> On Sun, Feb 17, 2013 at 10:44 AM, Richard Purdie
>> >> <richard.purdie@linuxfoundation.org> wrote:
>> >> > On Sun, 2013-02-17 at 10:40 -0300, Otavio Salvador wrote:
>> >> >> On Sun, Feb 17, 2013 at 4:47 AM, Richard Purdie
>> >> >> <richard.purdie@linuxfoundation.org> wrote:
>> >> >> > On Sat, 2013-02-16 at 19:20 -0200, Otavio Salvador wrote:
>> >> >> >> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> >> >> >> ---
>> >> >> >>  meta/recipes-core/dbus/dbus.inc | 2 +-
>> >> >> >>  1 file changed, 1 insertion(+), 1 deletion(-)
>> >> >> >>
>> >> >> >> diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
>> >> >> >> index 292ab29..cebab28 100644
>> >> >> >> --- a/meta/recipes-core/dbus/dbus.inc
>> >> >> >> +++ b/meta/recipes-core/dbus/dbus.inc
>> >> >> >> @@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
>> >> >> >>  X11DEPENDS = "virtual/libx11 libsm"
>> >> >> >>  DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
>> >> >> >>  DEPENDS_class-native = "expat-native virtual/libintl-native"
>> >> >> >> -DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl virtual/libx11"
>> >> >> >> +DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl ${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)}"
>> >> >> >>  RDEPENDS_dbus = "${@base_contains('DISTRO_FEATURES', 'ptest', 'dbus-ptest', '', d)}"
>> >> >> >>  RDEPENDS_class-native = ""
>> >> >> >
>> >> >> > This tends to be a really bad idea for dbus-nativesdk. If you install an
>> >> >> > SDK compiled with these options into PATH only a system which does have
>> >> >> > x11, it will break functionality in a way unacceptable to users.
>> >> >>
>> >> >> I don't see how it'd break anything being deployed in a toolchain. We
>> >> >> don't initialize the dbus daemon so it is mostly used to fulfill
>> >> >> dependencies.
>> >> >
>> >> > Imagine you source the toolchain setup script. The limited functionality
>> >> > dbus-launch just got into PATH. Now you run some X application. Things
>> >> > break.
>> >>
>> >> You usually to not source the env script and run your X server on top
>> >> of it, I think. Personally I source it in a terminal session inside of
>> >> X and use it to build things only.
>> >
>> > No, but people do open a terminal in X and then source the script there,
>> > then run other X applications from within the terminal window. Those X
>> > applications can use dbus activation. A dbus-launch without x11 support
>> > causes problems in this situation.
>>
>> Yes; got it.
>>
>> So your idea is to avoid x11 dependency altogether and drop
>> dbus-launch to avoid this errors?
>
> Yes, I did the same thing with dbus-native for exactly this reason (e.g.
> X apps from within a devshell). I didn't touch dbus-nativesdk since it
> has the X dependency and I didn't think it was bothering anyone.

Ok; will make v2 with this change.

Patch

diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index 292ab29..cebab28 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -8,7 +8,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
 X11DEPENDS = "virtual/libx11 libsm"
 DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
 DEPENDS_class-native = "expat-native virtual/libintl-native"
-DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl virtual/libx11"
+DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl ${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11', '', d)}"
 RDEPENDS_dbus = "${@base_contains('DISTRO_FEATURES', 'ptest', 'dbus-ptest', '', d)}"
 RDEPENDS_class-native = ""