All of lore.kernel.org
 help / color / mirror / Atom feed
* Why increment PRINC by 2?
@ 2014-04-10 15:55 Patrick Doyle
  2014-04-10 16:23 ` Denys Dmytriyenko
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Doyle @ 2014-04-10 15:55 UTC (permalink / raw)
  To: yocto@yoctoproject.org

The BSP guide gives the following helpful tip for installing a custom
/etc/network/interfaces file (see
https://www.yoctoproject.org/docs/current/bsp-guide/bsp-guide.html#customizing-a-recipe-for-a-bsp
-- and thank you, BTW -- that addressed a specific problem I needed to
solve):

1. Edit the init-ifupdown_1.0.bbappend file so that it contains the following:

     FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
     PRINC := "${@int(PRINC) + 2}"


The append file needs to be in the meta-xyz/recipes-core/init-ifupdown
directory.

2. Create and place the new interfaces configuration file in the BSP's
layer here:

     meta-xyz/recipes-core/init-ifupdown/files/xyz/interfaces

In my continuing attempt to understand the mindset of Yocto
practitioners, I would appreciate any light folks can shed on this... it
opens up so many questions to me...

1) Why does FILESEXTRAPATHS exist?  The documentation says, "You can
extend FILESPATH variable by using FILESEXTRAPATHS."  Errr, can't one
extend FILESPATH with

FILESPATH = "blah:" + $FILESPATH

or
FILESPATH_prepend = "blah:"

I see that the documentation for FILESPATH specifically states:

"Do not hand-edit the FILESPATH variable. If you want the build system
to look in directories other than the defaults, extend the FILESPATH
variable by using the FILESEXTRAPATHS variable."

but that doesn't help me understand why this method is preferred for
extending FILESPATH.

2) Why does PRINC exist?  The documentation says that PRINC "causes
the PR variable of .bbappend files to dynamically increment" and that
"This increment minimizes the impact of layer ordering."  I guess that
means that the init-ifupdown_1.0.bb file has some revision (which I
think is "1.0") and that, when my .bbappend file is appended to it,
causes the recipe to effectively be "3.0".  Why do I care?  If there
is an "init-ifupdown_5.0.bb" file someplace in my search path, won't I
get that one anyway?  How does this minimize the impact of layer
ordering?

Oh yeah, and why increment by 2?  Why not 1, or pi?

I guess I only had 2 questions... but 1,000,000 subquestions :-)

Thanks for any tips you can give me.

--wpd


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

end of thread, other threads:[~2014-04-10 16:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-10 15:55 Why increment PRINC by 2? Patrick Doyle
2014-04-10 16:23 ` Denys Dmytriyenko
2014-04-10 16:32   ` 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.