* value of "PACKAGE_BEFORE_PN" versus "PACKAGES =+"?
@ 2013-01-02 17:04 Robert P. J. Day
2013-01-02 18:55 ` Saul Wold
0 siblings, 1 reply; 5+ messages in thread
From: Robert P. J. Day @ 2013-01-02 17:04 UTC (permalink / raw)
To: OE Core mailing list
just now noticed the variable PACKAGE_BEFORE_PN, whose entire
usage in poky (other than documentation) is:
meta/conf/bitbake.conf:PACKAGE_BEFORE_PN ?= ""
meta/conf/bitbake.conf:PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}"
meta/classes/lib_package.bbclass:PACKAGE_BEFORE_PN = "${PN}-bin"
is there an actual need for that variable that places the new
package names *precisely* in that location in the PACKAGES list? and
given the specificity of the initial PN-related packages:
"${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale"
is there any reason more recipes couldn't use PACKAGE_BEFORE_PN
instead of "PACKAGES =+" when defining new packages? i *realize*
those two things don't represent the same thing but, in many cases,
would the end result be the same?
is there any reason more code doesn't use "PACKAGE_BEFORE_PN"?
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: value of "PACKAGE_BEFORE_PN" versus "PACKAGES =+"?
2013-01-02 17:04 value of "PACKAGE_BEFORE_PN" versus "PACKAGES =+"? Robert P. J. Day
@ 2013-01-02 18:55 ` Saul Wold
2013-01-03 11:27 ` Robert P. J. Day
0 siblings, 1 reply; 5+ messages in thread
From: Saul Wold @ 2013-01-02 18:55 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: OE Core mailing list
On 01/02/2013 09:04 AM, Robert P. J. Day wrote:
>
> just now noticed the variable PACKAGE_BEFORE_PN, whose entire
> usage in poky (other than documentation) is:
>
> meta/conf/bitbake.conf:PACKAGE_BEFORE_PN ?= ""
> meta/conf/bitbake.conf:PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}"
> meta/classes/lib_package.bbclass:PACKAGE_BEFORE_PN = "${PN}-bin"
>
> is there an actual need for that variable that places the new
> package names *precisely* in that location in the PACKAGES list? and
> given the specificity of the initial PN-related packages:
>
Yes, the need in the case of lib_package it to ensure that the ${PN}-bin
(bindir and sbindir) files get packages separately from the ${PN} files,
which are typically the libraries in the case of recipes that deliver
libraries and binaries.
> "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale"
>
> is there any reason more recipes couldn't use PACKAGE_BEFORE_PN
> instead of "PACKAGES =+" when defining new packages? i *realize*
> those two things don't represent the same thing but, in many cases,
> would the end result be the same?
>
> is there any reason more code doesn't use "PACKAGE_BEFORE_PN"?
>
The =+ prepends it to the list and therefore is correctly greedy for the
items they are trying to package. Since the PACKAGE_BEFORE_PN
specifically inserts it, so for the most part there is no real need to
use the P_B_P variable, and =+ is more consistent.
Sau!
> rday
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: value of "PACKAGE_BEFORE_PN" versus "PACKAGES =+"?
2013-01-02 18:55 ` Saul Wold
@ 2013-01-03 11:27 ` Robert P. J. Day
2013-01-03 21:47 ` Paul Eggleton
0 siblings, 1 reply; 5+ messages in thread
From: Robert P. J. Day @ 2013-01-03 11:27 UTC (permalink / raw)
To: Saul Wold; +Cc: OE Core mailing list
On Wed, 2 Jan 2013, Saul Wold wrote:
> On 01/02/2013 09:04 AM, Robert P. J. Day wrote:
> >
> > just now noticed the variable PACKAGE_BEFORE_PN, whose entire
> > usage in poky (other than documentation) is:
> >
> > meta/conf/bitbake.conf:PACKAGE_BEFORE_PN ?= ""
> > meta/conf/bitbake.conf:PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev
> > ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}"
> > meta/classes/lib_package.bbclass:PACKAGE_BEFORE_PN = "${PN}-bin"
> >
> > is there an actual need for that variable that places the new
> > package names *precisely* in that location in the PACKAGES list?
> > and given the specificity of the initial PN-related packages:
> >
> Yes, the need in the case of lib_package it to ensure that the
> ${PN}-bin (bindir and sbindir) files get packages separately from
> the ${PN} files, which are typically the libraries in the case of
> recipes that deliver libraries and binaries.
predictably, a few minutes after i posted, i realized what was going
on. i was a bit confused since the variable name, PACKAGE_BEFORE_PN,
was so terrifically generic when its purpose is clearly to deal with
library packages for which (as you say) you'd like to break out the
generated binary artifacts under /usr/bin and /usr/sbin as a separate
output package, which makes sense.
> > "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale"
> >
> > is there any reason more recipes couldn't use PACKAGE_BEFORE_PN
> > instead of "PACKAGES =+" when defining new packages? i *realize*
> > those two things don't represent the same thing but, in many cases,
> > would the end result be the same?
> >
> > is there any reason more code doesn't use "PACKAGE_BEFORE_PN"?
> >
> The =+ prepends it to the list and therefore is correctly greedy for
> the items they are trying to package. Since the PACKAGE_BEFORE_PN
> specifically inserts it, so for the most part there is no real need
> to use the P_B_P variable, and =+ is more consistent.
the point i was trying to make above (probably badly) was that it
seemed unlikely there was much (effective) difference between, as you
point out, usage of P_B_P and using =+:
PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}"
unless those earlier packages in the above would greedily suck up any
of /usr/bin or /usr/sbin.
so, to recap (to make sure i can explain it properly), OE's
bitbake.conf already defines this:
PACKAGE_BEFORE_PN ?= ""
PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}"
... snip ...
FILES_${PN}-bin = "${bindir}/* ${sbindir}/*"
which will have no effect unless, in your recipe, you inherit
lib_package, which pulls in:
PACKAGE_BEFORE_PN = "${PN}-bin"
at which point, you can either accept the default definition of
FILES_${PN}-bin as sucking up *everything* left under /usr/bin and
/usr/sbin or you can set it explicitly to some other value, which
brings me to two final questions.
is there any value in setting FILES_${PN}-bin without inheriting
lib_package? see oe-core/meta/recipes-multimedia/pulseaudio, where
pulseaudio.inc contains the line:
FILES_${PN}-bin += "${sysconfdir}/default/volatiles/volatiles.04_pulse"
but there is no reference to lib_package anywhere in that recipe
directory. so what's the point of that line above?
on the other hand, you can always just set PACKAGE_BEFORE_PN
explicitly and skip all of lib_package.bbclass, like this in
meta-openembedded/meta-networking/recipes-protocols/quagga/quagga.inc:
# Split into a main package and separate per-protocol packages
PACKAGE_BEFORE_PN = "${PN}-ospfd ${PN}-ospf6d ${PN}-babeld ${PN}-bgpd
\
${PN}-ripd ${PN}-ripngd ${PN}-isisd \
${PN}-ospfclient ${PN}-watchquagga"
FILES_${PN}-ospfd = "${sbindir}/ospfd ${libdir}/libospf.so.*"
FILES_${PN}-ospf6d = "${sbindir}/ospf6d"
FILES_${PN}-babeld = "${sbindir}/babeld"
FILES_${PN}-bgpd = "${sbindir}/bgpd"
FILES_${PN}-ripd = "${sbindir}/ripd"
FILES_${PN}-ripngd = "${sbindir}/ripngd"
FILES_${PN}-isisd = "${sbindir}/isisd"
FILES_${PN}-ospfclient = "${sbindir}/ospfclient
${libdir}/libospfapiclient.so.*"
FILES_${PN}-watchquagga = "${sbindir}/watchquagga ${sysconfdir}/default/watchquagga \
${sysconfdir}/init.d/watchquagga"
is all of that about right?
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: value of "PACKAGE_BEFORE_PN" versus "PACKAGES =+"?
2013-01-03 11:27 ` Robert P. J. Day
@ 2013-01-03 21:47 ` Paul Eggleton
2013-01-03 23:43 ` Robert P. J. Day
0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggleton @ 2013-01-03 21:47 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: openembedded-core
On Thursday 03 January 2013 06:27:57 Robert P. J. Day wrote:
> predictably, a few minutes after i posted, i realized what was going
> on. i was a bit confused since the variable name, PACKAGE_BEFORE_PN,
> was so terrifically generic when its purpose is clearly to deal with
> library packages for which (as you say) you'd like to break out the
> generated binary artifacts under /usr/bin and /usr/sbin as a separate
> output package, which makes sense.
It does exactly what it says - puts package(s) before PN.
> the point i was trying to make above (probably badly) was that it
> seemed unlikely there was much (effective) difference between, as you
> point out, usage of P_B_P and using =+:
>
> PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale
> ${PACKAGE_BEFORE_PN} ${PN}"
>
> unless those earlier packages in the above would greedily suck up any
> of /usr/bin or /usr/sbin.
That's correct. PACKAGE_BEFORE_PN just makes things a little easier.
> is there any value in setting FILES_${PN}-bin without inheriting
> lib_package?
If ${PN}-bin has otherwise been added to PACKAGES, sure.
> see oe-core/meta/recipes-multimedia/pulseaudio, where
> pulseaudio.inc contains the line:
>
> FILES_${PN}-bin += "${sysconfdir}/default/volatiles/volatiles.04_pulse"
>
> but there is no reference to lib_package anywhere in that recipe
> directory. so what's the point of that line above?
Looks like this is a mistake (or something left over from an earlier revision
of the recipe) since ${PN}-bin isn't in PACKAGES for pulseaudio.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: value of "PACKAGE_BEFORE_PN" versus "PACKAGES =+"?
2013-01-03 21:47 ` Paul Eggleton
@ 2013-01-03 23:43 ` Robert P. J. Day
0 siblings, 0 replies; 5+ messages in thread
From: Robert P. J. Day @ 2013-01-03 23:43 UTC (permalink / raw)
To: Paul Eggleton; +Cc: openembedded-core
On Thu, 3 Jan 2013, Paul Eggleton wrote:
> On Thursday 03 January 2013 06:27:57 Robert P. J. Day wrote:
>
> > see oe-core/meta/recipes-multimedia/pulseaudio, where
> > pulseaudio.inc contains the line:
> >
> > FILES_${PN}-bin += "${sysconfdir}/default/volatiles/volatiles.04_pulse"
> >
> > but there is no reference to lib_package anywhere in that recipe
> > directory. so what's the point of that line above?
>
> Looks like this is a mistake (or something left over from an earlier revision
> of the recipe) since ${PN}-bin isn't in PACKAGES for pulseaudio.
i suspected something like that, just wanted to clarify. i'll let
someone higher up the food chain fix that in whatever way is
appropriate.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-01-03 23:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-02 17:04 value of "PACKAGE_BEFORE_PN" versus "PACKAGES =+"? Robert P. J. Day
2013-01-02 18:55 ` Saul Wold
2013-01-03 11:27 ` Robert P. J. Day
2013-01-03 21:47 ` Paul Eggleton
2013-01-03 23:43 ` Robert P. J. Day
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox