From: Denys Dmytriyenko <denis@denix.org>
To: Patrick Doyle <wpdster@gmail.com>
Cc: "yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: Re: Why increment PRINC by 2?
Date: Thu, 10 Apr 2014 12:23:31 -0400 [thread overview]
Message-ID: <20140410162331.GO3370@denix.org> (raw)
In-Reply-To: <CAF_dkJABdHQcftHoPJ1EO_bdjahyYJ84HZL5V+mErqzQaTKJSQ@mail.gmail.com>
On Thu, Apr 10, 2014 at 11:55:08AM -0400, Patrick Doyle wrote:
> 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?
That is PV (package version) you are thinking of. But PRINC increments PR
(package revision).
PR is not used in the recipe names, but rather in resulting binary packages.
So your init-ifupdown_1.0.bb/bbappend will result in a binary package of
init-ifupdown_1.0-r0_<arch/mach>.ipk/rpm
That portion -r0 will be incremented, becoming -r2 or the original+2 (can be
any number)
PV usually corresponds to changes in the sources, while PR corresponds to
changes in the recipe. If a recipe is composed from multiple parts (.inc file
or .bbappend) you may want to distinguish that.
As an alternative, some distro chose to append a more meaningful suffix to PR
instead of just incrementing PR. I.e. our Arago distro appends "-aragoX" where
X is the number of revisions we made in our distro on top of the main recipe.
The end result of the package version will be "3.5-r6-arago2". It means the
sources for the package are of version 3.5, the main recipe was updated 6
times and there were also 2 more recipe bbappend updates by the distro...
It's a common practice in Linux Distro world - Ubuntu uses the same principle,
when updating packages inherited from Debian, e.g. bash_4.1-2ubuntu3_i386.deb
--
Denys
> 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
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
next prev parent reply other threads:[~2014-04-10 16:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-10 15:55 Why increment PRINC by 2? Patrick Doyle
2014-04-10 16:23 ` Denys Dmytriyenko [this message]
2014-04-10 16:32 ` Denys Dmytriyenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140410162331.GO3370@denix.org \
--to=denis@denix.org \
--cc=wpdster@gmail.com \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.