All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* Which is the best strategy to customize Qt configuration?
@ 2015-07-13 14:23 Pampolini Matteo
  2015-07-13 15:47 ` Leonardo Sandoval
       [not found] ` <22658_1436802429_55A3DD7C_22658_11739_1_55A3DDA1.8020100@linux.intel.com>
  0 siblings, 2 replies; 10+ messages in thread
From: Pampolini Matteo @ 2015-07-13 14:23 UTC (permalink / raw)
  To: yocto@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]

Hello everybody,


my name is Matteo and I'm writing from Italy.


I'm involved in a project that requires a very customized Linux installation and I think Yocto is the best choice for this purpose.


I was able to build and run some images from Poky 1.8 reference and now I'm trying to create my own one, with a custom configuration of Qt for X11.


In particular I would like to remove Phonon support to avoid GStreamer/GLib dependencies: the quickest (and bad) solution was to modify meta/recipes-qt/qt4/qt4.inc file and it works, of course.


But in order to follow Yocto guidelines and learn the right approach, I would like to create a new layer and, with proper use of .bbappend files, create my own Qt custom configuration.


Now I'm in trouble a little bit because I do not exactly now which Qt-related files should be included in my layer and how they should relate with the provided ones, may you please help me?


Many thanks in advance for your kind support,


Matteo

[-- Attachment #2: Type: text/html, Size: 4210 bytes --]

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

* Re: Which is the best strategy to customize Qt configuration?
  2015-07-13 14:23 Which is the best strategy to customize Qt configuration? Pampolini Matteo
@ 2015-07-13 15:47 ` Leonardo Sandoval
  2015-07-13 16:05   ` Paul Eggleton
       [not found]   ` <22658_1436803637_55A3E234_22658_12077_1_10339148.fJj1pddUcL@peggleto-mobl.ger.corp.intel.com>
       [not found] ` <22658_1436802429_55A3DD7C_22658_11739_1_55A3DDA1.8020100@linux.intel.com>
  1 sibling, 2 replies; 10+ messages in thread
From: Leonardo Sandoval @ 2015-07-13 15:47 UTC (permalink / raw)
  To: Pampolini Matteo, yocto@yoctoproject.org



On 07/13/2015 09:23 AM, Pampolini Matteo wrote:
> Hello everybody,
>
>
> my name is Matteo and I'm writing from Italy.
>
>
> I'm involved in a project that requires a very customized Linux installation and I think Yocto is the best choice for this purpose.
>
>
> I was able to build and run some images from Poky 1.8 reference and now I'm trying to create my own one, with a custom configuration of Qt for X11.
>
>
> In particular I would like to remove Phonon support to avoid GStreamer/GLib dependencies: the quickest (and bad) solution was to modify meta/recipes-qt/qt4/qt4.inc file and it works, of course.
>
>
> But in order to follow Yocto guidelines and learn the right approach, I would like to create a new layer and, with proper use of .bbappend files, create my own Qt custom configuration.
>

For this point, you can create a new layer and inside a new image file. 
This image will basically inherit the one you want, then you need to 
remove the specific recipe. A possible way to remove it is though 
IMAGE_INSTALL_remove = "<pkg to remove">

>
> Now I'm in trouble a little bit because I do not exactly now which Qt-related files should be included in my layer and how they should relate with the provided ones, may you please help me?
>

Dependencies can be found using the '-g' bitbake command line. That 
command produces .dot files, and you can parse these to figure out what 
you want.

>
> Many thanks in advance for your kind support,
>
>
> Matteo
>
>
>


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

* Re: Which is the best strategy to customize Qt configuration?
       [not found] ` <22658_1436802429_55A3DD7C_22658_11739_1_55A3DDA1.8020100@linux.intel.com>
@ 2015-07-13 16:05   ` Pampolini Matteo
  0 siblings, 0 replies; 10+ messages in thread
From: Pampolini Matteo @ 2015-07-13 16:05 UTC (permalink / raw)
  To: Leonardo Sandoval, yocto@yoctoproject.org

Many thanks Leonardo.

However I still have some doubts: as far as I understood I should remove the dependencies from glib and gstreamer inside DEPENDS variable as it appears in qt4.inc file, otherwise BitBake, correctly, downloads and compiles them to satisfy Qt requirements, am I right?

If so, how can I avoid this from within my layer?

Regards, Matteo
________________________________________
From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Sent: Monday, July 13, 2015 5:47 PM
To: Pampolini Matteo; yocto@yoctoproject.org
Subject: Re: [yocto] Which is the best strategy to customize Qt configuration?

On 07/13/2015 09:23 AM, Pampolini Matteo wrote:
> Hello everybody,
>
>
> my name is Matteo and I'm writing from Italy.
>
>
> I'm involved in a project that requires a very customized Linux installation and I think Yocto is the best choice for this purpose.
>
>
> I was able to build and run some images from Poky 1.8 reference and now I'm trying to create my own one, with a custom configuration of Qt for X11.
>
>
> In particular I would like to remove Phonon support to avoid GStreamer/GLib dependencies: the quickest (and bad) solution was to modify meta/recipes-qt/qt4/qt4.inc file and it works, of course.
>
>
> But in order to follow Yocto guidelines and learn the right approach, I would like to create a new layer and, with proper use of .bbappend files, create my own Qt custom configuration.
>

For this point, you can create a new layer and inside a new image file.
This image will basically inherit the one you want, then you need to
remove the specific recipe. A possible way to remove it is though
IMAGE_INSTALL_remove = "<pkg to remove">

>
> Now I'm in trouble a little bit because I do not exactly now which Qt-related files should be included in my layer and how they should relate with the provided ones, may you please help me?
>

Dependencies can be found using the '-g' bitbake command line. That
command produces .dot files, and you can parse these to figure out what
you want.

>
> Many thanks in advance for your kind support,
>
>
> Matteo
>
>
>


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

* Re: Which is the best strategy to customize Qt configuration?
  2015-07-13 15:47 ` Leonardo Sandoval
@ 2015-07-13 16:05   ` Paul Eggleton
       [not found]   ` <22658_1436803637_55A3E234_22658_12077_1_10339148.fJj1pddUcL@peggleto-mobl.ger.corp.intel.com>
  1 sibling, 0 replies; 10+ messages in thread
From: Paul Eggleton @ 2015-07-13 16:05 UTC (permalink / raw)
  To: Pampolini Matteo, Leonardo Sandoval; +Cc: yocto

On Monday 13 July 2015 10:47:45 Leonardo Sandoval wrote:
> On 07/13/2015 09:23 AM, Pampolini Matteo wrote:
> > I'm involved in a project that requires a very customized Linux
> > installation and I think Yocto is the best choice for this purpose.
> > 
> > I was able to build and run some images from Poky 1.8 reference and now
> > I'm trying to create my own one, with a custom configuration of Qt for
> > X11.
> > 
> > In particular I would like to remove Phonon support to avoid
> > GStreamer/GLib dependencies: the quickest (and bad) solution was to
> > modify meta/recipes-qt/qt4/qt4.inc file and it works, of course.
> > 
> > But in order to follow Yocto guidelines and learn the right approach, I
> > would like to create a new layer and, with proper use of .bbappend files,
> > create my own Qt custom configuration.
>
> For this point, you can create a new layer and inside a new image file.
> This image will basically inherit the one you want, then you need to
> remove the specific recipe. A possible way to remove it is though
> IMAGE_INSTALL_remove = "<pkg to remove">

That doesn't really help with Qt configuration - you can't change any of that 
at the image level.

The way to set this properly is to look at how qt4.inc is structured - note 
that the -phonon / -no-phonon option for example is set through a variable 
QT_PHONON. There are several different ways you could set this:

1) Use a bbappend on the qt4-x11-free recipe that sets 
QT_PHONON = "-no-phonon"

2) Set it from your distro config (or some include file from there) using
QT_PHONON_pn-qt4-x11-free = "-no-phonon"

3) Since this variable specifically is being set in the .inc file with ?= and is 
reasonably well namespaced (i.e. has a name which is unlikely to clash with 
variables used in other recipes for a different purpose), you could 
alternatively just set it from your distro config simply as 
QT_PHONON = "-no-phonon"

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: Which is the best strategy to customize Qt configuration?
       [not found]   ` <22658_1436803637_55A3E234_22658_12077_1_10339148.fJj1pddUcL@peggleto-mobl.ger.corp.intel.com>
@ 2015-07-13 16:18     ` Pampolini Matteo
  2015-07-13 16:38       ` Paul Eggleton
  0 siblings, 1 reply; 10+ messages in thread
From: Pampolini Matteo @ 2015-07-13 16:18 UTC (permalink / raw)
  To: Paul Eggleton, Leonardo Sandoval; +Cc: yocto@yoctoproject.org

Thanks Paul.

It was also my idea to override QT_PHONON variable inside my .bbappend file, but the fact is that this does not prevent BitBake from downloading and compiling glib/gstreamer.

In my first hack, when I modified the original qt.inc file, I had to make both changes, DEPENDS variable for BitBake and QT_PHONON for Qt itself.

As I wrote in my answer to Leonardo the issue is: how can I override the value of DEPENDS variable in my own layer, if possible?

Matteo
________________________________________
From: Paul Eggleton <paul.eggleton@linux.intel.com>
Sent: Monday, July 13, 2015 6:05 PM
To: Pampolini Matteo; Leonardo Sandoval
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] Which is the best strategy to customize Qt configuration?

On Monday 13 July 2015 10:47:45 Leonardo Sandoval wrote:
> On 07/13/2015 09:23 AM, Pampolini Matteo wrote:
> > I'm involved in a project that requires a very customized Linux
> > installation and I think Yocto is the best choice for this purpose.
> >
> > I was able to build and run some images from Poky 1.8 reference and now
> > I'm trying to create my own one, with a custom configuration of Qt for
> > X11.
> >
> > In particular I would like to remove Phonon support to avoid
> > GStreamer/GLib dependencies: the quickest (and bad) solution was to
> > modify meta/recipes-qt/qt4/qt4.inc file and it works, of course.
> >
> > But in order to follow Yocto guidelines and learn the right approach, I
> > would like to create a new layer and, with proper use of .bbappend files,
> > create my own Qt custom configuration.
>
> For this point, you can create a new layer and inside a new image file.
> This image will basically inherit the one you want, then you need to
> remove the specific recipe. A possible way to remove it is though
> IMAGE_INSTALL_remove = "<pkg to remove">

That doesn't really help with Qt configuration - you can't change any of that
at the image level.

The way to set this properly is to look at how qt4.inc is structured - note
that the -phonon / -no-phonon option for example is set through a variable
QT_PHONON. There are several different ways you could set this:

1) Use a bbappend on the qt4-x11-free recipe that sets
QT_PHONON = "-no-phonon"

2) Set it from your distro config (or some include file from there) using
QT_PHONON_pn-qt4-x11-free = "-no-phonon"

3) Since this variable specifically is being set in the .inc file with ?= and is
reasonably well namespaced (i.e. has a name which is unlikely to clash with
variables used in other recipes for a different purpose), you could
alternatively just set it from your distro config simply as
QT_PHONON = "-no-phonon"

Cheers,
Paul

--

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: Which is the best strategy to customize Qt configuration?
  2015-07-13 16:18     ` Pampolini Matteo
@ 2015-07-13 16:38       ` Paul Eggleton
  2015-07-13 18:04         ` Martin Jansa
  0 siblings, 1 reply; 10+ messages in thread
From: Paul Eggleton @ 2015-07-13 16:38 UTC (permalink / raw)
  To: Pampolini Matteo; +Cc: yocto@yoctoproject.org

On Monday 13 July 2015 16:18:55 Pampolini Matteo wrote:
> It was also my idea to override QT_PHONON variable inside my .bbappend file,
> but the fact is that this does not prevent BitBake from downloading and
> compiling glib/gstreamer.
> 
> In my first hack, when I modified the original qt.inc file, I had to make
> both changes, DEPENDS variable for BitBake and QT_PHONON for Qt itself.
> 
> As I wrote in my answer to Leonardo the issue is: how can I override the
> value of DEPENDS variable in my own layer, if possible?

You can set DEPENDS in the qt4-x11-free bbappend just as with any other 
variable. In this instance you could use the _remove operator e.g.

DEPENDS_remove = "gstreamer gst-plugins-base"

(This will only work here having additionally set QT_PHONON = "-no-phonon" to 
disable the underlying depenendency, of course.)

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: Which is the best strategy to customize Qt configuration?
  2015-07-13 16:38       ` Paul Eggleton
@ 2015-07-13 18:04         ` Martin Jansa
  2015-07-13 18:10           ` Elvis Dowson
                             ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Martin Jansa @ 2015-07-13 18:04 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: yocto@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 1560 bytes --]

On Mon, Jul 13, 2015 at 05:38:59PM +0100, Paul Eggleton wrote:
> On Monday 13 July 2015 16:18:55 Pampolini Matteo wrote:
> > It was also my idea to override QT_PHONON variable inside my .bbappend file,
> > but the fact is that this does not prevent BitBake from downloading and
> > compiling glib/gstreamer.
> > 
> > In my first hack, when I modified the original qt.inc file, I had to make
> > both changes, DEPENDS variable for BitBake and QT_PHONON for Qt itself.
> > 
> > As I wrote in my answer to Leonardo the issue is: how can I override the
> > value of DEPENDS variable in my own layer, if possible?
> 
> You can set DEPENDS in the qt4-x11-free bbappend just as with any other 
> variable. In this instance you could use the _remove operator e.g.
> 
> DEPENDS_remove = "gstreamer gst-plugins-base"

Will this work if gstreamer gst-plugins-base aren't next to each other
in DEPENDS?

I think good convention is to use:
DEPENDS_remove = "gstreamer"
DEPENDS_remove = "gst-plugins-base"
for it to work even after original DEPENDS in the recipe is re-ordered
or changed.

Regards,

> (This will only work here having additionally set QT_PHONON = "-no-phonon" to 
> disable the underlying depenendency, of course.)
> 
> Cheers,
> Paul
> 
> -- 
> 
> Paul Eggleton
> Intel Open Source Technology Centre
> -- 
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: Which is the best strategy to customize Qt configuration?
  2015-07-13 18:04         ` Martin Jansa
@ 2015-07-13 18:10           ` Elvis Dowson
  2015-07-14  8:06           ` Paul Eggleton
       [not found]           ` <15988_1436861200_55A4C310_15988_12931_1_59871636.IPlF15pPhG@peggleto-mobl.ger.corp.intel.com>
  2 siblings, 0 replies; 10+ messages in thread
From: Elvis Dowson @ 2015-07-13 18:10 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Yocto Discussion Mailing List


> On Jul 13, 2015, at 22:04, Martin Jansa <martin.jansa@gmail.com> wrote:
> 
> Will this work if gstreamer gst-plugins-base aren't next to each other
> in DEPENDS?
> 
> I think good convention is to use:
> DEPENDS_remove = "gstreamer"
> DEPENDS_remove = "gst-plugins-base"
> for it to work even after original DEPENDS in the recipe is re-ordered
> or changed.

Shouldn't you be using += instead of =, so that you append to the list:

DEPENDS_remove += "gstreamer"
DEPENDS_remove += "gst-plugins-base"

The earlier line had it in one line, so it was okay:

DEPENDS_remove = "gstreamer gst-plugins-base"

Regards,

Elvis Dowson


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

* Re: Which is the best strategy to customize Qt configuration?
  2015-07-13 18:04         ` Martin Jansa
  2015-07-13 18:10           ` Elvis Dowson
@ 2015-07-14  8:06           ` Paul Eggleton
       [not found]           ` <15988_1436861200_55A4C310_15988_12931_1_59871636.IPlF15pPhG@peggleto-mobl.ger.corp.intel.com>
  2 siblings, 0 replies; 10+ messages in thread
From: Paul Eggleton @ 2015-07-14  8:06 UTC (permalink / raw)
  To: Martin Jansa; +Cc: yocto@yoctoproject.org

On Monday 13 July 2015 20:04:42 Martin Jansa wrote:
> On Mon, Jul 13, 2015 at 05:38:59PM +0100, Paul Eggleton wrote:
> > On Monday 13 July 2015 16:18:55 Pampolini Matteo wrote:
> > > It was also my idea to override QT_PHONON variable inside my .bbappend
> > > file, but the fact is that this does not prevent BitBake from
> > > downloading and compiling glib/gstreamer.
> > > 
> > > In my first hack, when I modified the original qt.inc file, I had to
> > > make
> > > both changes, DEPENDS variable for BitBake and QT_PHONON for Qt itself.
> > > 
> > > As I wrote in my answer to Leonardo the issue is: how can I override the
> > > value of DEPENDS variable in my own layer, if possible?
> > 
> > You can set DEPENDS in the qt4-x11-free bbappend just as with any other
> > variable. In this instance you could use the _remove operator e.g.
> > 
> > DEPENDS_remove = "gstreamer gst-plugins-base"
> 
> Will this work if gstreamer gst-plugins-base aren't next to each other
> in DEPENDS?

Yes, it will. Try it ;)

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: Which is the best strategy to customize Qt configuration?
       [not found]           ` <15988_1436861200_55A4C310_15988_12931_1_59871636.IPlF15pPhG@peggleto-mobl.ger.corp.intel.com>
@ 2015-07-14 13:02             ` Pampolini Matteo
  0 siblings, 0 replies; 10+ messages in thread
From: Pampolini Matteo @ 2015-07-14 13:02 UTC (permalink / raw)
  To: Paul Eggleton, Martin Jansa; +Cc: yocto@yoctoproject.org

Many many thanks to all of you for your support, I tried what you suggested and it works fine!

Regards, Matteo
________________________________________
From: Paul Eggleton <paul.eggleton@linux.intel.com>
Sent: Tuesday, July 14, 2015 10:06 AM
To: Martin Jansa
Cc: Pampolini Matteo; yocto@yoctoproject.org
Subject: Re: [yocto] Which is the best strategy to customize Qt configuration?

On Monday 13 July 2015 20:04:42 Martin Jansa wrote:
> On Mon, Jul 13, 2015 at 05:38:59PM +0100, Paul Eggleton wrote:
> > On Monday 13 July 2015 16:18:55 Pampolini Matteo wrote:
> > > It was also my idea to override QT_PHONON variable inside my .bbappend
> > > file, but the fact is that this does not prevent BitBake from
> > > downloading and compiling glib/gstreamer.
> > >
> > > In my first hack, when I modified the original qt.inc file, I had to
> > > make
> > > both changes, DEPENDS variable for BitBake and QT_PHONON for Qt itself.
> > >
> > > As I wrote in my answer to Leonardo the issue is: how can I override the
> > > value of DEPENDS variable in my own layer, if possible?
> >
> > You can set DEPENDS in the qt4-x11-free bbappend just as with any other
> > variable. In this instance you could use the _remove operator e.g.
> >
> > DEPENDS_remove = "gstreamer gst-plugins-base"
>
> Will this work if gstreamer gst-plugins-base aren't next to each other
> in DEPENDS?

Yes, it will. Try it ;)

Cheers,
Paul

--

Paul Eggleton
Intel Open Source Technology Centre


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

end of thread, other threads:[~2015-07-14 13:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-13 14:23 Which is the best strategy to customize Qt configuration? Pampolini Matteo
2015-07-13 15:47 ` Leonardo Sandoval
2015-07-13 16:05   ` Paul Eggleton
     [not found]   ` <22658_1436803637_55A3E234_22658_12077_1_10339148.fJj1pddUcL@peggleto-mobl.ger.corp.intel.com>
2015-07-13 16:18     ` Pampolini Matteo
2015-07-13 16:38       ` Paul Eggleton
2015-07-13 18:04         ` Martin Jansa
2015-07-13 18:10           ` Elvis Dowson
2015-07-14  8:06           ` Paul Eggleton
     [not found]           ` <15988_1436861200_55A4C310_15988_12931_1_59871636.IPlF15pPhG@peggleto-mobl.ger.corp.intel.com>
2015-07-14 13:02             ` Pampolini Matteo
     [not found] ` <22658_1436802429_55A3DD7C_22658_11739_1_55A3DDA1.8020100@linux.intel.com>
2015-07-13 16:05   ` Pampolini Matteo

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.