dev-manual: Added note about AUTOREV for replicating build

Feedback from Paul.

(From yocto-docs rev: ea118a9d6fa671de10b9aa8413c7d29951593ec3)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Scott Rifenbark
2019-03-19 09:06:47 -06:00
committed by Richard Purdie
parent 95d6ad04fb
commit ddc9d240f4

View File

@@ -6370,7 +6370,7 @@
Use BitBake to fetch your sources but inhibit the
build:
<literallayout class='monospaced'>
$ bitbake <replaceable>target</replaceable> --runonly=fetch"
$ bitbake <replaceable>target</replaceable> --runonly=fetch
</literallayout>
The downloads directory now has a "snapshot" of the
source files used for the build.
@@ -6382,6 +6382,7 @@
by removing any Git or other Source Control Management
(SCM) subdirectories such as
<filename>${DL_DIR}/git2/*</filename>.
The tarballs already contain these subdirectories.
</para></listitem>
</orderedlist>
</para>
@@ -6398,7 +6399,7 @@
downloads directory:
<orderedlist>
<listitem><para>
<emphasis>Instruct the Build Process to Build Using Local Files:</emphasis>
<emphasis>Using Local Files Only:</emphasis>
Add the
<ulink url='&YOCTO_DOCS_BB_URL;#var-bb-BB_NO_NETWORK'><filename>BB_NO_NETWORK</filename></ulink>
variables to your <filename>local.conf</filename>.
@@ -6423,10 +6424,62 @@
<literallayout class='monospaced'>
$ bitbake <replaceable>target</replaceable>
</literallayout>
The build completes using the know local "snapshot" of
The build completes using the known local "snapshot" of
source files from your mirror.
The resulting tarballs for your "snapshot" of source
files are in the downloads directory.
<note>
<para>The offline build does not work if recipes
attempt to find the latest version of software
by setting
<ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>
to
<filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-AUTOREV'><filename>AUTOREV</filename></ulink><filename>}</filename>:
<literallayout class='monospaced'>
SRCREV = "${AUTOREV}"
</literallayout>
When a recipe sets
<filename>SRCREV</filename> to
<filename>${AUTOREV}</filename>, the build system
accesses the network in an attempt to determine the
latest version of software from the SCM.
Typically, recipes that use
<filename>AUTOREV</filename> are custom or
modified recipes.
Recipes that reside in public repositories
usually do not use <filename>AUTOREV</filename>.
</para>
<para>If you do have recipes that use
<filename>AUTOREV</filename>, you can take steps to
still use the recipes in an offline build.
Do the following:
<orderedlist>
<listitem><para>
Use a configuration generated by
enabling
<link linkend='maintaining-build-output-quality'>build history</link>.
</para></listitem>
<listitem><para>
Use the
<filename>buildhistory-collect-srcrevs</filename>
command to collect the stored
<filename>SRCREV</filename> values from
the build's history.
For more information on collecting these
values, see the
"<link linkend='build-history-package-information'>Build History Package Information</link>"
section.
</para></listitem>
<listitem><para>
Once you have the correct source
revisions, you can modify those recipes
to to set <filename>SRCREV</filename>
to specific versions of the software.
</para></listitem>
</orderedlist>
</para>
</note>
</para></listitem>
</orderedlist>
</para>