Skip to contentSkip to conversation

writeup on the mechanics of FILESEXTRAPATHS and bbappend files

DISCUSSION Robert P. J. Day 6 participants 15 messages Apr 17, 2013 – Apr 19, 2013

lore
Share & tools
lore
#0 lore raw

a while back, i dug into how FILESEXTRAPATHS worked with respect to
.bbappend files and i wrote it up, just updated it a bit here:

http://www.crashcourse.ca/wiki/index.php/FILESEXTRAPATHS_and_bbappend_files

do i have it about right? it seemed that the underlying details weren't really explained well in any of the current yocto docs, and i wanted something i could point students at.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#1 lore raw
Quoted 8 lines · On Wednesday 17 April 2013 10:24:42 Robert P. J. Day wrote:

a while back, i dug into how FILESEXTRAPATHS worked with respect to
.bbappend files and i wrote it up, just updated it a bit here:

http://www.crashcourse.ca/wiki/index.php/FILESEXTRAPATHS_and_bbappend_files

do i have it about right? it seemed that the underlying details weren't really explained well in any of the current yocto docs, and i wanted something i could point students at.

It looks OK to me although if you're going to point students at it I might suggest moving the "don't look here!" stuff elsewhere ;)

Also as I believe I mentioned before, FILESEXTRAPATHS adds not just one directory but an "entire list of directories" is it allows bbappend file path behaviour to match that of the recipe itself.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#2 lore raw
Quoted 4 lines · Paul Eggleton
Quoted 3 lines · On Wednesday 17 April 2013 10:24:42 Robert P. J. Day wrote:

a while back, i dug into how FILESEXTRAPATHS worked with respect to
.bbappend files and i wrote it up, just updated it a bit here:

Quoted 8 lines
Quoted 5 lines

http://www.crashcourse.ca/wiki/index.php/FILESEXTRAPATHS_and_bbappend_files

do i have it about right? it seemed that the underlying details weren't really explained well in any of the current yocto docs, and i wanted something i could point students at.

It looks OK to me although if you're going to point students at it I might suggest moving the "don't look here!" stuff elsewhere ;)

yes, that's going to be updated with more examples ripped from the
headlines. :-)

Quoted 3 lines

Also as I believe I mentioned before, FILESEXTRAPATHS adds not just one directory but an "entire list of directories" is it allows bbappend file path behaviour to match that of the recipe itself.

quite so. the reason i did that writeup is that, as i mentioned, i
don't think the behaviour of FILESEXTRAPATHS is well explained. for example, the entry in the reference manual variable glossary here:

http://www.yoctoproject.org/docs/1.2/poky-ref-manual/poky-ref-manual.html#var-FILESEXTRAPATHS

doesn't even *hint* at the underlying behaviour, which i think is important to understand.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#3 lore raw

Just a note here regarding which Yocto Project manuals to look at for the most current information. Use the 1.4 manuals. So for the FILESEXTRAPATHS variable description you should look at http://www.yoctoproject.org/docs/1.4/ref-manual/ref-manual.html#var-FILESEXTRAPATHS entry. The description in this more recent manual may be lacking as well. I will try and work on that going forward.

Also, the "poky-ref-manual" part of the name has been changed to a symlink for releases 1.3 forward. This manual path for 1.3 on should direct the user to the manual whose location includes "ref-manual".

Scott

Quoted 60 lines

-----Original Message-----
From: [email protected] [mailto:yocto- [email protected]] On Behalf Of Robert P. J. Day
Sent: Wednesday, April 17, 2013 8:12 AM
To: Paul Eggleton
Cc: [email protected]
Subject: Re: [yocto] writeup on the mechanics of FILESEXTRAPATHS and bbappend files

Quoted 2 lines · Paul Eggleton
Quoted 1 line · On Wednesday 17 April 2013 10:24:42 Robert P. J. Day wrote:

a while back, i dug into how FILESEXTRAPATHS worked with respect

to

Quoted 3 lines
Quoted 3 lines

.bbappend files and i wrote it up, just updated it a bit here:

http://www.crashcourse.ca/wiki/index.php/FILESEXTRAPATHS_and_bbappend_fi
les

Quoted 3 lines
Quoted 3 lines

do i have it about right? it seemed that the underlying details weren't really explained well in any of the current yocto docs, and

i

Quoted 4 lines
Quoted 1 line

wanted something i could point students at.

It looks OK to me although if you're going to point students at it I might suggest moving the "don't look here!" stuff elsewhere ;)

yes, that's going to be updated with more examples ripped from the
headlines. :-)

Quoted 3 lines

Also as I believe I mentioned before, FILESEXTRAPATHS adds not just one directory but an "entire list of directories" is it allows bbappend file path behaviour to match that of the recipe itself.

quite so. the reason i did that writeup is that, as i mentioned, i
don't think the behaviour of FILESEXTRAPATHS is well explained. for example, the entry in the reference manual variable glossary here:

http://www.yoctoproject.org/docs/1.2/poky-ref-manual/poky-ref-
manual.html#var-FILESEXTRAPATHS

doesn't even *hint* at the underlying behaviour, which i think is important to understand.

rday

--

========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday

========================================================================
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#4 lore raw
Quoted 6 lines · Scott M

Just a note here regarding which Yocto Project manuals to look at for the most current information. Use the 1.4 manuals. So for the FILESEXTRAPATHS variable description you should look at
http://www.yoctoproject.org/docs/1.4/ref-manual/ref-manual.html#var-FILESEXTRAPATHS
entry. The description in this more recent manual may be lacking as well. I will try and work on that going forward.

i use the "in progress" version of all of the manuals, so i still
think that glossary entry is a bit skimpy on details. on the other hand, glossary entries are *normally* fairly brief, so a full explanation of something like that probably belongs elsewhere, anyway.

rday

p.s. i think one of the manuals should mention chris larson's "bitbake-env" utility, which i use for debugging and explanations all the time.

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#5 lore raw
Quoted 3 lines · On Wednesday 17 April 2013 11:39:09 Robert P. J. Day wrote:

p.s. i think one of the manuals should mention chris larson's "bitbake-env" utility, which i use for debugging and explanations all the time.

I'd rather wait until we actually integrate that into BitBake (i.e. provide it with the BitBake source, which I hope we can look at within the next development cycle).

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#6 lore raw
Quoted 8 lines · Paul Eggleton
Quoted 3 lines · On Wednesday 17 April 2013 11:39:09 Robert P. J. Day wrote:

p.s. i think one of the manuals should mention chris larson's "bitbake-env" utility, which i use for debugging and explanations all the time.

I'd rather wait until we actually integrate that into BitBake (i.e. provide it with the BitBake source, which I hope we can look at within the next development cycle).

Is it as simple as including it in the contrib directory?

Quoted 12 lines

Cheers,
Paul

--

Paul Eggleton
Intel Open Source Technology Centre
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#7 lore raw
In reply to Paul Eggleton
Quoted 10 lines · Paul Eggleton
Quoted 8 lines · On Wednesday 17 April 2013 10:24:42 Robert P. J. Day wrote:

a while back, i dug into how FILESEXTRAPATHS worked with respect to
.bbappend files and i wrote it up, just updated it a bit here:

http://www.crashcourse.ca/wiki/index.php/FILESEXTRAPATHS_and_bbappend_files

do i have it about right? it seemed that the underlying details weren't really explained well in any of the current yocto docs, and i wanted something i could point students at.

Quoted 6 lines

It looks OK to me although if you're going to point students at it I might suggest moving the "don't look here!" stuff elsewhere ;)

Also as I believe I mentioned before, FILESEXTRAPATHS adds not just one directory but an "entire list of directories" is it allows bbappend file path behaviour to match that of the recipe itself.

I also think it would be good to point out the use of := in the FILESEXTRAPATHS assignment and why it's important.

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#8 lore raw
Quoted 14 lines · Gary Thomas
Quoted 13 lines · Paul Eggleton
Quoted 8 lines · On Wednesday 17 April 2013 10:24:42 Robert P. J. Day wrote:

a while back, i dug into how FILESEXTRAPATHS worked with respect to
.bbappend files and i wrote it up, just updated it a bit here:

http://www.crashcourse.ca/wiki/index.php/FILESEXTRAPATHS_and_bbappend_files

do i have it about right? it seemed that the underlying details weren't really explained well in any of the current yocto docs, and i wanted something i could point students at.

It looks OK to me although if you're going to point students at it I might suggest moving the "don't look here!" stuff elsewhere ;)

Quoted 7 lines
Quoted 4 lines

Also as I believe I mentioned before, FILESEXTRAPATHS adds not just one directory but an "entire list of directories" is it allows bbappend file path
behaviour to match that of the recipe itself.

I also think it would be good to point out the use of := in the FILESEXTRAPATHS assignment and why it's important.

done:

http://www.crashcourse.ca/wiki/index.php/FILESEXTRAPATHS_and_bbappend_files#Adding_the_meta-yocto_layer_and_building_for_a_BeagleBoard

i'm already unhappy with the way that whole page is written so i'll redesign it this weekend, and maybe add a bit more. i just remember it taking me a while to truly understand what was happening there so i figured i'd better write it down before i forgot.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#9 lore raw
Quoted 21 lines · Robert P. J. Day
Quoted 19 lines · Gary Thomas
Quoted 17 lines · Paul Eggleton
Quoted 8 lines · On Wednesday 17 April 2013 10:24:42 Robert P. J. Day wrote:

a while back, i dug into how FILESEXTRAPATHS worked with respect to
.bbappend files and i wrote it up, just updated it a bit here:

http://www.crashcourse.ca/wiki/index.php/FILESEXTRAPATHS_and_bbappend_files

do i have it about right? it seemed that the underlying details weren't really explained well in any of the current yocto docs, and i wanted something i could point students at.

It looks OK to me although if you're going to point students at it I might suggest moving the "don't look here!" stuff elsewhere ;)

Also as I believe I mentioned before, FILESEXTRAPATHS adds not just one directory but an "entire list of directories" is it allows bbappend file path
behaviour to match that of the recipe itself.

Quoted 6 lines
Quoted 2 lines

I also think it would be good to point out the use of := in the FILESEXTRAPATHS assignment and why it's important.

done:

http://www.crashcourse.ca/wiki/index.php/FILESEXTRAPATHS_and_bbappend_files#Adding_the_meta-yocto_layer_and_building_for_a_BeagleBoard

Thanks. You might add a comment about what happens if you do it wrong (I should know!) that it will search in the directory that has the .bb file and not the .bbappend.

Quoted 8 lines

i'm already unhappy with the way that whole page is written so i'll redesign it this weekend, and maybe add a bit more. i just remember it taking me a while to truly understand what was happening there so i figured i'd better write it down before i forgot.

rday

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#10 lore raw
In reply to Gary Thomas
Quoted 3 lines · Gary Thomas

I also think it would be good to point out the use of := in the FILESEXTRAPATHS
assignment and why it's important.

Knowing that the := operator will put your directories first is only useful if you also know that the underlying mechanism will take the first such files from the given directories it encounters :-) What's to say bitbake doesn't look at all the directories/files and take the last ones?

#11 lore raw
Quoted 5 lines · Trevor Woerner
Quoted 2 lines · Gary Thomas

I also think it would be good to point out the use of := in the FILESEXTRAPATHS assignment and why it's important.

Knowing that the := operator will put your directories first

whoa, i'm not sure i'd phrase it *that* way but i know what you're
getting at.

Quoted 4 lines

is only useful if you also know that the underlying mechanism will take the first such files from the given directories it encounters :-) What's to say bitbake doesn't look at all the directories/files and take the last ones?

ok, so i should add that it's left-to-right parsing? fair enough.
although i suspect most people would just *assume* that but it's always better to be explicit.

at the moment, i'm more interested in egregious errors in my
explanation. again, i don't think FILESEXTRAPATHS is explained in sufficient detail to prevent newbies from getting confused and into real trouble.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#12 lore raw
In reply to Trevor Woerner
Quoted 10 lines · Trevor Woerner
Quoted 3 lines · Gary Thomas

I also think it would be good to point out the use of := in the FILESEXTRAPATHS
assignment and why it's important.

Knowing that the := operator will put your directories first is only useful if you also know that the underlying mechanism will take the first such files from the given directories it encounters :-) What's to say bitbake doesn't look at all the directories/files and take the last ones?

This has more to do with how the path is constructed (using _prepend).

My point, which was totally unclear to me when using this line, was that with ':=' ${THISDIR} evaluates to the directory that contains the .bbappend file (what you want/need) whereas with '=' it evaluates to the directory containing the main .bb file. Incredibly confusing if you miss it...

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#13 lore raw
Quoted 12 lines · Gary Thomas
Quoted 10 lines · Trevor Woerner
Quoted 3 lines · Gary Thomas

I also think it would be good to point out the use of := in the FILESEXTRAPATHS
assignment and why it's important.

Knowing that the := operator will put your directories first is only useful if you also know that the underlying mechanism will take the first such files from the given directories it encounters :-) What's to say bitbake doesn't look at all the directories/files and take the last ones?

Quoted 7 lines

This has more to do with how the path is constructed (using _prepend).

My point, which was totally unclear to me when using this line, was that with ':=' ${THISDIR} evaluates to the directory that contains the .bbappend file (what you want/need) whereas with '=' it evaluates to the directory containing the main .bb file. Incredibly confusing if you miss it...

ah, quite so, must make a note of that. i wonder how many other
places that point should be made forcefully.

rday

Signature · 7 lines
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
#14 lore raw
In reply to Gary Thomas

Sorry if I'm asking a really stupid question, but if so, it means I'm way off the mark :-)

Quoted 5 lines · Gary Thomas

My point, which was totally unclear to me when using this line, was that with ':=' ${THISDIR} evaluates to the directory that contains the .bbappend file (what you want/need) whereas with '=' it evaluates to the directory containing the main .bb file. Incredibly confusing if you miss it...

So it's (sort of like) a matter of timing?

By evaluating THISDIR now (though the use of ':='), we get the directory we are in when this directive is encountered. Whereas with '=' it will be evaluated sometime in the future when we are no longer in THISDIR but rather in SOMEOTHERDIR?