All of lore.kernel.org
 help / color / mirror / Atom feed
* couple questions on PACKAGECONFIG (for improving docs)
@ 2020-04-06 16:05 rpjday
  2020-04-06 16:38 ` [OE-core] " Quentin Schulz
  0 siblings, 1 reply; 6+ messages in thread
From: rpjday @ 2020-04-06 16:05 UTC (permalink / raw)
  To: OE Core mailing list


  wanted to tweak the ref manual entry for PACKAGECONFIG, so a couple
issues. first, the ref manual entry:

https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PACKAGECONFIG

says nothing about the possible *sixth* entry, described in
base.bbclass as "foo_conflict_packageconfig", so i can add that but
i'm open to proper wording since i'd probably screw it up.
(i'd add an actual example from poky/ demonstrating this, such as:

meta/recipes-support/curl/curl_7.69.1.bb:PACKAGECONFIG[threaded-resolver]
  = "--enable-threaded-resolver,--disable-threaded-resolver,,,,ares"

  i'd be tempted to show some of the simpler variations of
PACKAGECONFIG, such as (if i read it correctly) being equivalent to
simply adding RDEPENDS values (right?):

meta/recipes-support/boost/boost.inc:PACKAGECONFIG[graph_parallel] =
  ",,,boost-mpi mpich"

  finally, i'd toss in explaining this, which might confuse people:

meta/recipes-multimedia/pulseaudio/pulseaudio.inc:PACKAGECONFIG[autospawn-for-root]
  = ",,,"

i'm betting some developers might wonder what that is all about and,
for every example i've seen for that, it involves *something*
explicitly checking for that config setting somewhere in the recipe,
as in the case above:

do_compile_append () {
  if ${@bb.utils.contains('PACKAGECONFIG', 'autospawn-for-root', 'true', 'false', d)}; then
    set_cfg_value src/client.conf allow-autospawn-for-root yes
  fi
}

  all that make sense?

rday

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

* Re: [OE-core] couple questions on PACKAGECONFIG (for improving docs)
  2020-04-06 16:05 couple questions on PACKAGECONFIG (for improving docs) rpjday
@ 2020-04-06 16:38 ` Quentin Schulz
  2020-04-06 17:58   ` rpjday
  0 siblings, 1 reply; 6+ messages in thread
From: Quentin Schulz @ 2020-04-06 16:38 UTC (permalink / raw)
  To: rpjday; +Cc: OE Core mailing list

Hi,

Mostly bringing nothing more than my "+1" because I've seen a few of
your mails never answered so just wanted to cheer you a little bit :)

On Mon, Apr 06, 2020 at 12:05:15PM -0400, rpjday@crashcourse.ca wrote:
> 
>   wanted to tweak the ref manual entry for PACKAGECONFIG, so a couple
> issues. first, the ref manual entry:
> 
> https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PACKAGECONFIG
> 
> says nothing about the possible *sixth* entry, described in
> base.bbclass as "foo_conflict_packageconfig", so i can add that but
> i'm open to proper wording since i'd probably screw it up.
> (i'd add an actual example from poky/ demonstrating this, such as:
> 
> meta/recipes-support/curl/curl_7.69.1.bb:PACKAGECONFIG[threaded-resolver]
>   = "--enable-threaded-resolver,--disable-threaded-resolver,,,,ares"
> 

https://media.giphy.com/media/puPeyz4SOYEKY/giphy.gif
[minion screaming what]

Didn't know about that one :) So PLEASE, document :)

>   i'd be tempted to show some of the simpler variations of
> PACKAGECONFIG, such as (if i read it correctly) being equivalent to
> simply adding RDEPENDS values (right?):
> 
> meta/recipes-support/boost/boost.inc:PACKAGECONFIG[graph_parallel] =
>   ",,,boost-mpi mpich"
> 

I'm torn about this one. If it really is just for a RDEPENDS and not
used elsewhere... Why not just an RDEPENDS? We would need a proper
exemple for that I guess.

>   finally, i'd toss in explaining this, which might confuse people:
> 
> meta/recipes-multimedia/pulseaudio/pulseaudio.inc:PACKAGECONFIG[autospawn-for-root]
>   = ",,,"
> 
> i'm betting some developers might wonder what that is all about and,
> for every example i've seen for that, it involves *something*
> explicitly checking for that config setting somewhere in the recipe,
> as in the case above:
> 
> do_compile_append () {
>   if ${@bb.utils.contains('PACKAGECONFIG', 'autospawn-for-root', 'true', 'false', d)}; then
>     set_cfg_value src/client.conf allow-autospawn-for-root yes
>   fi
> }
> 

Indeed, not straight-forward use. I saw the use of PACKAGECONFIG values
in wpa-supplicant recipe for example. At the same time, I don't feel
like we would need to explain that? There is nothing specific to
PACKAGECONFIG variable in the example above and I'm afraid we would make
the docs even more verbose than it already is? 

Speaking of that, the wpa-supplicant recipe would benefit from this 6th
option I think (provided openssl and gnutls are antinomic of course, but
seems like from the do_install).
https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.9.bb#n13

Thanks for your work on the docs, I take great pleasure in reading your
mails and learn new things about every time from the consequent
discussion :)

Quentin

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

* Re: [OE-core] couple questions on PACKAGECONFIG (for improving docs)
  2020-04-06 16:38 ` [OE-core] " Quentin Schulz
@ 2020-04-06 17:58   ` rpjday
  2020-04-06 18:00     ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: rpjday @ 2020-04-06 17:58 UTC (permalink / raw)
  To: Quentin Schulz; +Cc: OE Core mailing list

On Mon, 6 Apr 2020, Quentin Schulz wrote:

> On Mon, Apr 06, 2020 at 12:05:15PM -0400, rpjday@crashcourse.ca wrote:
> >
> >   wanted to tweak the ref manual entry for PACKAGECONFIG, so a couple
> > issues. first, the ref manual entry:
> >
> > https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PACKAGECONFIG
> >
> > says nothing about the possible *sixth* entry, described in
> > base.bbclass as "foo_conflict_packageconfig", so i can add that but
> > i'm open to proper wording since i'd probably screw it up.
> > (i'd add an actual example from poky/ demonstrating this, such as:
> >
> > meta/recipes-support/curl/curl_7.69.1.bb:PACKAGECONFIG[threaded-resolver]
> >   = "--enable-threaded-resolver,--disable-threaded-resolver,,,,ares"
>
> https://media.giphy.com/media/puPeyz4SOYEKY/giphy.gif
> [minion screaming what]
>
> Didn't know about that one :) So PLEASE, document :)

  yeah, that was one of those cases where i just wanted to match
examples against the actual processing in base.bbclass, and went,
"whoa, what the heck is *that*?" then went looking for examples. in
fact, curl is a nice example, as it contains:

# 'ares' and 'threaded-resolver' are mutually exclusive
PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares,,,threaded-resolver"
... snip ...
PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver,,,,ares"

so that's the obvious example to demonstrate that. i'd never noticed
that before.

> >   i'd be tempted to show some of the simpler variations of
> > PACKAGECONFIG, such as (if i read it correctly) being equivalent
> > to simply adding RDEPENDS values (right?):
> >
> > meta/recipes-support/boost/boost.inc:PACKAGECONFIG[graph_parallel] =
> >   ",,,boost-mpi mpich"
>
> I'm torn about this one. If it really is just for a RDEPENDS and not
> used elsewhere... Why not just an RDEPENDS? We would need a proper
> exemple for that I guess.

there are a small number of these in oe-core including:

meta/recipes-devtools/opkg-utils/opkg-utils_0.4.2.bb:PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"
meta/recipes-extended/sudo/sudo.inc:PACKAGECONFIG[pam-wheel] = ",,,pam-plugin-wheel"
meta/recipes-multimedia/alsa/alsa-tools_1.1.7.bb:PACKAGECONFIG[hwmixvolume] = ",,,python-core python-pygobject pyalsa"

it appears that this is slightly more general than a regular RDEPENDS
in the sense that a single PACKAGECONFIG setting can pull in an
arbitrary number of RDEPENDS values. so it appears to be a convenience
shortcut.

> >   finally, i'd toss in explaining this, which might confuse people:
> >
> > meta/recipes-multimedia/pulseaudio/pulseaudio.inc:PACKAGECONFIG[autospawn-for-root]
> >   = ",,,"
> >
> > i'm betting some developers might wonder what that is all about and,
> > for every example i've seen for that, it involves *something*
> > explicitly checking for that config setting somewhere in the recipe,
> > as in the case above:
> >
> > do_compile_append () {
> >   if ${@bb.utils.contains('PACKAGECONFIG', 'autospawn-for-root', 'true', 'false', d)}; then
> >     set_cfg_value src/client.conf allow-autospawn-for-root yes
> >   fi
> > }
> >
>
> Indeed, not straight-forward use. I saw the use of PACKAGECONFIG
> values in wpa-supplicant recipe for example. At the same time, I
> don't feel like we would need to explain that? There is nothing
> specific to PACKAGECONFIG variable in the example above and I'm
> afraid we would make the docs even more verbose than it already is?

  that is always a risk.

> Speaking of that, the wpa-supplicant recipe would benefit from this
> 6th option I think (provided openssl and gnutls are antinomic of
> course, but seems like from the do_install).
> https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.9.bb#n13

  i don't think that's what the wpa-supplicant recipe is suggesting. i
think the do_install step in that recipe file is simply saying that
choosing openssl takes precedence over choosing gnutls, nothing more.
i see nothing to suggest that only one of those PACKAGECONFIG settings
can be selected but, as always, i am willing to be corrected.

rday

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

* Re: [OE-core] couple questions on PACKAGECONFIG (for improving docs)
  2020-04-06 17:58   ` rpjday
@ 2020-04-06 18:00     ` Richard Purdie
  2020-04-06 18:01       ` rpjday
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2020-04-06 18:00 UTC (permalink / raw)
  To: rpjday, Quentin Schulz; +Cc: OE Core mailing list

On Mon, 2020-04-06 at 13:58 -0400, rpjday@crashcourse.ca wrote:
> On Mon, 6 Apr 2020, Quentin Schulz wrote:
> 
> > On Mon, Apr 06, 2020 at 12:05:15PM -0400, rpjday@crashcourse.ca
> > wrote:
> > >   wanted to tweak the ref manual entry for PACKAGECONFIG, so a
> > > couple
> > > issues. first, the ref manual entry:
> > > 
> > > https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PACKAGECONFIG
> > > 
> > > says nothing about the possible *sixth* entry, described in
> > > base.bbclass as "foo_conflict_packageconfig", so i can add that
> > > but
> > > i'm open to proper wording since i'd probably screw it up.
> > > (i'd add an actual example from poky/ demonstrating this, such
> > > as:
> > > 
> > > meta/recipes-support/curl/curl_7.69.1.bb:PACKAGECONFIG[threaded-
> > > resolver]
> > >   = "--enable-threaded-resolver,--disable-threaded-
> > > resolver,,,,ares"
> > 
> > https://media.giphy.com/media/puPeyz4SOYEKY/giphy.gif
> > [minion screaming what]
> > 
> > Didn't know about that one :) So PLEASE, document :)
> 
>   yeah, that was one of those cases where i just wanted to match
> examples against the actual processing in base.bbclass, and went,
> "whoa, what the heck is *that*?" then went looking for examples. in
> fact, curl is a nice example, as it contains:
> 
> # 'ares' and 'threaded-resolver' are mutually exclusive
> PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-
> ares,,,threaded-resolver"
> ... snip ...
> PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,
> --disable-threaded-resolver,,,,ares"
> 
> so that's the obvious example to demonstrate that. i'd never noticed
> that before.

FWIW it was only added recently within the last month or so. We've not
got around to the docs for various reasons but happy to have help
there!

Cheers,

Richard


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

* Re: [OE-core] couple questions on PACKAGECONFIG (for improving docs)
  2020-04-06 18:00     ` Richard Purdie
@ 2020-04-06 18:01       ` rpjday
  2020-04-06 18:21         ` Denys Dmytriyenko
  0 siblings, 1 reply; 6+ messages in thread
From: rpjday @ 2020-04-06 18:01 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Quentin Schulz, OE Core mailing list

On Mon, 6 Apr 2020, Richard Purdie wrote:

> On Mon, 2020-04-06 at 13:58 -0400, rpjday@crashcourse.ca wrote:
> > On Mon, 6 Apr 2020, Quentin Schulz wrote:
> >
> > > On Mon, Apr 06, 2020 at 12:05:15PM -0400, rpjday@crashcourse.ca
> > > wrote:
> > > >   wanted to tweak the ref manual entry for PACKAGECONFIG, so a
> > > > couple
> > > > issues. first, the ref manual entry:
> > > >
> > > > https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PACKAGECONFIG
> > > >
> > > > says nothing about the possible *sixth* entry, described in
> > > > base.bbclass as "foo_conflict_packageconfig", so i can add that
> > > > but
> > > > i'm open to proper wording since i'd probably screw it up.
> > > > (i'd add an actual example from poky/ demonstrating this, such
> > > > as:
> > > >
> > > > meta/recipes-support/curl/curl_7.69.1.bb:PACKAGECONFIG[threaded-
> > > > resolver]
> > > >   = "--enable-threaded-resolver,--disable-threaded-
> > > > resolver,,,,ares"
> > >
> > > https://media.giphy.com/media/puPeyz4SOYEKY/giphy.gif
> > > [minion screaming what]
> > >
> > > Didn't know about that one :) So PLEASE, document :)
> >
> >   yeah, that was one of those cases where i just wanted to match
> > examples against the actual processing in base.bbclass, and went,
> > "whoa, what the heck is *that*?" then went looking for examples. in
> > fact, curl is a nice example, as it contains:
> >
> > # 'ares' and 'threaded-resolver' are mutually exclusive
> > PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-
> > ares,,,threaded-resolver"
> > ... snip ...
> > PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,
> > --disable-threaded-resolver,,,,ares"
> >
> > so that's the obvious example to demonstrate that. i'd never noticed
> > that before.
>
> FWIW it was only added recently within the last month or so. We've not
> got around to the docs for various reasons but happy to have help
> there!

  ok, that explains it ... i'll put something together once i get to
that point in the manual.

rday

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

* Re: [OE-core] couple questions on PACKAGECONFIG (for improving docs)
  2020-04-06 18:01       ` rpjday
@ 2020-04-06 18:21         ` Denys Dmytriyenko
  0 siblings, 0 replies; 6+ messages in thread
From: Denys Dmytriyenko @ 2020-04-06 18:21 UTC (permalink / raw)
  To: rpjday; +Cc: Richard Purdie, Quentin Schulz, OE Core mailing list

On Mon, Apr 06, 2020 at 02:01:45PM -0400, rpjday@crashcourse.ca wrote:
> On Mon, 6 Apr 2020, Richard Purdie wrote:
> 
> > On Mon, 2020-04-06 at 13:58 -0400, rpjday@crashcourse.ca wrote:
> > > On Mon, 6 Apr 2020, Quentin Schulz wrote:
> > >
> > > > On Mon, Apr 06, 2020 at 12:05:15PM -0400, rpjday@crashcourse.ca
> > > > wrote:
> > > > >   wanted to tweak the ref manual entry for PACKAGECONFIG, so a
> > > > > couple
> > > > > issues. first, the ref manual entry:
> > > > >
> > > > > https://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PACKAGECONFIG
> > > > >
> > > > > says nothing about the possible *sixth* entry, described in
> > > > > base.bbclass as "foo_conflict_packageconfig", so i can add that
> > > > > but
> > > > > i'm open to proper wording since i'd probably screw it up.
> > > > > (i'd add an actual example from poky/ demonstrating this, such
> > > > > as:
> > > > >
> > > > > meta/recipes-support/curl/curl_7.69.1.bb:PACKAGECONFIG[threaded-
> > > > > resolver]
> > > > >   = "--enable-threaded-resolver,--disable-threaded-
> > > > > resolver,,,,ares"
> > > >
> > > > https://media.giphy.com/media/puPeyz4SOYEKY/giphy.gif
> > > > [minion screaming what]
> > > >
> > > > Didn't know about that one :) So PLEASE, document :)
> > >
> > >   yeah, that was one of those cases where i just wanted to match
> > > examples against the actual processing in base.bbclass, and went,
> > > "whoa, what the heck is *that*?" then went looking for examples. in
> > > fact, curl is a nice example, as it contains:
> > >
> > > # 'ares' and 'threaded-resolver' are mutually exclusive
> > > PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-
> > > ares,,,threaded-resolver"
> > > ... snip ...
> > > PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,
> > > --disable-threaded-resolver,,,,ares"
> > >
> > > so that's the obvious example to demonstrate that. i'd never noticed
> > > that before.
> >
> > FWIW it was only added recently within the last month or so. We've not
> > got around to the docs for various reasons but happy to have help
> > there!
> 
>   ok, that explains it ... i'll put something together once i get to
> that point in the manual.

https://git.openembedded.org/openembedded-core/commit/?id=734475b3f86d88a548bc9eb91d836bd1b9335e9f

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

end of thread, other threads:[~2020-04-06 18:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-06 16:05 couple questions on PACKAGECONFIG (for improving docs) rpjday
2020-04-06 16:38 ` [OE-core] " Quentin Schulz
2020-04-06 17:58   ` rpjday
2020-04-06 18:00     ` Richard Purdie
2020-04-06 18:01       ` rpjday
2020-04-06 18:21         ` Denys Dmytriyenko

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.