* curious about why bitbake.conf setting of FILES_${PN}-bin
@ 2014-07-15 13:24 Robert P. J. Day
2014-07-15 15:23 ` Saul Wold
0 siblings, 1 reply; 6+ messages in thread
From: Robert P. J. Day @ 2014-07-15 13:24 UTC (permalink / raw)
To: OE Core mailing list
currently doing a writeup on file distribution among a recipe's
generated packages, and noticed the following. here's a snippet from
OE's bitbake.conf:
PACKAGE_BEFORE_PN ?= ""
PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}"
PACKAGES_DYNAMIC = "^${PN}-locale-.*"
FILES = ""
FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \
${sysconfdir} ${sharedstatedir} ${localstatedir} \
${base_bindir}/* ${base_sbindir}/* \
${base_libdir}/*${SOLIBS} \
${base_prefix}/lib/udev/rules.d ${prefix}/lib/udev/rules.d \
${datadir}/${BPN} ${libdir}/${BPN}/* \
${datadir}/pixmaps ${datadir}/applications \
${datadir}/idl ${datadir}/omf ${datadir}/sounds \
${libdir}/bonobo/servers"
first, to make sure i understand the above correctly, the setting of
FILES_${PN} defines the (default) entire possible set of generated
files that will be used to populate the packages created by a single
recipe, correct?
also, since packages are populated in order, left to right, we'll
see file definitions like:
FILES_${PN}-dbg = ...
FILES_${PN}-staticdev = ...
FILES_${PN}-dev = ...
where, once a file is placed in a package, even if that name occurs
again in a later package, it will be skipped. (anyone remember which
manual this is mentioned in?)
however, i also see this:
FILES_${PN}-bin = "${bindir}/* ${sbindir}/*"
and i thought, that's weird, that particular package isn't mentioned
anywhere in bitbake.conf, why is it being defined if it isn't used?
ah, then i see this in lib_package.bbclass:
PACKAGE_BEFORE_PN = "${PN}-bin"
which clearly defines a library being packaged, but also allowing
binary executables to be broken out separately, which is fine, but
it's confusing why the setting of FILES_${PN}-bin is done in
bitbake.conf, when its only application is (currently) for library
packaging.
wouldn't it make more sense to move that line so that
lib_package.bbclass contained:
FILES_${PN}-bin = "${bindir}/* ${sbindir}/*"
PACKAGE_BEFORE_PN = "${PN}-bin"
that would make lib_package.bbclass more self-contained, and stop
bitbake.conf from setting a variable that most recipes don't care
about. thoughts?
rday
p.s. this kind of goes back to the image vs core-image discussion,
where one wonders why base classes are doing things that require
inheriting classes to finish off for them. or something like that.
--
========================================================================
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] 6+ messages in thread
* Re: curious about why bitbake.conf setting of FILES_${PN}-bin
2014-07-15 13:24 curious about why bitbake.conf setting of FILES_${PN}-bin Robert P. J. Day
@ 2014-07-15 15:23 ` Saul Wold
2014-07-15 15:49 ` Robert P. J. Day
2014-07-15 15:51 ` Burton, Ross
0 siblings, 2 replies; 6+ messages in thread
From: Saul Wold @ 2014-07-15 15:23 UTC (permalink / raw)
To: Robert P. J. Day, OE Core mailing list
On 07/15/2014 06:24 AM, Robert P. J. Day wrote:
>
> currently doing a writeup on file distribution among a recipe's
> generated packages, and noticed the following. here's a snippet from
> OE's bitbake.conf:
>
>
> PACKAGE_BEFORE_PN ?= ""
> PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}"
> PACKAGES_DYNAMIC = "^${PN}-locale-.*"
> FILES = ""
>
> FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \
> ${sysconfdir} ${sharedstatedir} ${localstatedir} \
> ${base_bindir}/* ${base_sbindir}/* \
> ${base_libdir}/*${SOLIBS} \
> ${base_prefix}/lib/udev/rules.d ${prefix}/lib/udev/rules.d \
> ${datadir}/${BPN} ${libdir}/${BPN}/* \
> ${datadir}/pixmaps ${datadir}/applications \
> ${datadir}/idl ${datadir}/omf ${datadir}/sounds \
> ${libdir}/bonobo/servers"
>
>
> first, to make sure i understand the above correctly, the setting of
> FILES_${PN} defines the (default) entire possible set of generated
> files that will be used to populate the packages created by a single
> recipe, correct?
>
This is correct
> also, since packages are populated in order, left to right, we'll
> see file definitions like:
>
> FILES_${PN}-dbg = ...
> FILES_${PN}-staticdev = ...
> FILES_${PN}-dev = ...
>
> where, once a file is placed in a package, even if that name occurs
> again in a later package, it will be skipped. (anyone remember which
> manual this is mentioned in?)
>
I just did a basic search and could not find any reference and I know
that PACKAGES/FILES is "greedy" meaning once a file is consumed by a
FILES entry it's not available again. Should probably be added to the
PACKAGES and / or FILES.
> however, i also see this:
>
> FILES_${PN}-bin = "${bindir}/* ${sbindir}/*"
>
> and i thought, that's weird, that particular package isn't mentioned
> anywhere in bitbake.conf, why is it being defined if it isn't used?
> ah, then i see this in lib_package.bbclass:
>
> PACKAGE_BEFORE_PN = "${PN}-bin"
>
> which clearly defines a library being packaged, but also allowing
> binary executables to be broken out separately, which is fine, but
> it's confusing why the setting of FILES_${PN}-bin is done in
> bitbake.conf, when its only application is (currently) for library
> packaging.
>
> wouldn't it make more sense to move that line so that
> lib_package.bbclass contained:
>
> FILES_${PN}-bin = "${bindir}/* ${sbindir}/*"
> PACKAGE_BEFORE_PN = "${PN}-bin"
>
> that would make lib_package.bbclass more self-contained, and stop
> bitbake.conf from setting a variable that most recipes don't care
> about. thoughts?
>
Blame me for that patch! Looking back at the commit message from about
2 years ago I think this got mid-way through a change, with the plan to
actually remove lib_package completely since all it contained was the
setting of PACKAGE_BEFORE_PN, therefore having FILES${PN}-bin. Not sure
why we did not end up completing that.
So another option is to remove the inherits and replace it with
PACKAGE_BEFORE_PNs, Which would finish off the orignal plan!
> rday
>
> p.s. this kind of goes back to the image vs core-image discussion,
> where one wonders why base classes are doing things that require
> inheriting classes to finish off for them. or something like that.
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: curious about why bitbake.conf setting of FILES_${PN}-bin
2014-07-15 15:23 ` Saul Wold
@ 2014-07-15 15:49 ` Robert P. J. Day
2014-07-15 15:51 ` Burton, Ross
1 sibling, 0 replies; 6+ messages in thread
From: Robert P. J. Day @ 2014-07-15 15:49 UTC (permalink / raw)
To: Saul Wold; +Cc: OE Core mailing list
On Tue, 15 Jul 2014, Saul Wold wrote:
> I just did a basic search and could not find any reference and I
> know that PACKAGES/FILES is "greedy" meaning once a file is consumed
> by a FILES entry it's not available again. Should probably be added
> to the PACKAGES and / or FILES.
i *know* i've read that before somewhere, just don't remember where.
the only reference i've seen recently is, coincidentally,
lib_package.bbclass:
#
# ${PN}-bin is defined in bitbake.conf
#
# We need to allow the other packages to be greedy with what they
# want out of /usr/bin and /usr/sbin before ${PN}-bin gets greedy.
#
PACKAGE_BEFORE_PN = "${PN}-bin"
anyone know if it's somewhere in one of the yocto manuals?
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] 6+ messages in thread
* Re: curious about why bitbake.conf setting of FILES_${PN}-bin
2014-07-15 15:23 ` Saul Wold
2014-07-15 15:49 ` Robert P. J. Day
@ 2014-07-15 15:51 ` Burton, Ross
2014-07-15 15:56 ` Saul Wold
1 sibling, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2014-07-15 15:51 UTC (permalink / raw)
To: Saul Wold; +Cc: OE Core mailing list
On 15 July 2014 16:23, Saul Wold <sgw@linux.intel.com> wrote:
> Blame me for that patch! Looking back at the commit message from about 2
> years ago I think this got mid-way through a change, with the plan to
> actually remove lib_package completely since all it contained was the
> setting of PACKAGE_BEFORE_PN, therefore having FILES${PN}-bin. Not sure why
> we did not end up completing that.
>
> So another option is to remove the inherits and replace it with
> PACKAGE_BEFORE_PNs, Which would finish off the orignal plan!
Wouldn't that change the packaging by putting all binaries into a
PN-bin package?
Ross
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: curious about why bitbake.conf setting of FILES_${PN}-bin
2014-07-15 15:51 ` Burton, Ross
@ 2014-07-15 15:56 ` Saul Wold
2014-07-15 16:18 ` Robert P. J. Day
0 siblings, 1 reply; 6+ messages in thread
From: Saul Wold @ 2014-07-15 15:56 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE Core mailing list
On 07/15/2014 08:51 AM, Burton, Ross wrote:
> On 15 July 2014 16:23, Saul Wold <sgw@linux.intel.com> wrote:
>> Blame me for that patch! Looking back at the commit message from about 2
>> years ago I think this got mid-way through a change, with the plan to
>> actually remove lib_package completely since all it contained was the
>> setting of PACKAGE_BEFORE_PN, therefore having FILES${PN}-bin. Not sure why
>> we did not end up completing that.
>>
>> So another option is to remove the inherits and replace it with
>> PACKAGE_BEFORE_PNs, Which would finish off the orignal plan!
>
> Wouldn't that change the packaging by putting all binaries into a
> PN-bin package?
>
No the change would be to rmove the inherit lib_packaging from the
recipes that use it and replace that with setting PACKAGE_BEFORE_PN with
${PN}-bin. So it's just doing what the recipes do already, not a
general change in bitbake.conf.
Sau!
> Ross
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: curious about why bitbake.conf setting of FILES_${PN}-bin
2014-07-15 15:56 ` Saul Wold
@ 2014-07-15 16:18 ` Robert P. J. Day
0 siblings, 0 replies; 6+ messages in thread
From: Robert P. J. Day @ 2014-07-15 16:18 UTC (permalink / raw)
To: Saul Wold; +Cc: OE Core mailing list
On Tue, 15 Jul 2014, Saul Wold wrote:
> On 07/15/2014 08:51 AM, Burton, Ross wrote:
> > On 15 July 2014 16:23, Saul Wold <sgw@linux.intel.com> wrote:
> > > Blame me for that patch! Looking back at the commit message
> > > from about 2 years ago I think this got mid-way through a
> > > change, with the plan to actually remove lib_package completely
> > > since all it contained was the setting of PACKAGE_BEFORE_PN,
> > > therefore having FILES${PN}-bin. Not sure why we did not end up
> > > completing that.
> > >
> > > So another option is to remove the inherits and replace it with
> > > PACKAGE_BEFORE_PNs, Which would finish off the orignal plan!
> >
> > Wouldn't that change the packaging by putting all binaries into a
> > PN-bin package?
> >
> No the change would be to rmove the inherit lib_packaging from the
> recipes that use it and replace that with setting PACKAGE_BEFORE_PN
> with ${PN}-bin. So it's just doing what the recipes do already, not
> a general change in bitbake.conf.
just FYI, while PACKAGE_BEFORE_PN is a cool concept, it's not like
there's a lot of it being used in the poky layer -- all of two uses:
meta/classes/lib_package.bbclass:PACKAGE_BEFORE_PN = "${PN}-bin"
meta/recipes-graphics/clutter/clutter-1.0.inc:PACKAGE_BEFORE_PN += "${PN}-examples"
was it really necessary to introduce a new variable just for that?
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] 6+ messages in thread
end of thread, other threads:[~2014-07-15 16:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-15 13:24 curious about why bitbake.conf setting of FILES_${PN}-bin Robert P. J. Day
2014-07-15 15:23 ` Saul Wold
2014-07-15 15:49 ` Robert P. J. Day
2014-07-15 15:51 ` Burton, Ross
2014-07-15 15:56 ` Saul Wold
2014-07-15 16:18 ` 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