[bitbake-devel] [PATCH 2/2] doc: Document use of Perforce fetcher
Andrew Bradford
andrew at bradfordembedded.com
Wed May 25 19:48:24 UTC 2016
From: Andrew Bradford <andrew.bradford at kodakalaris.com>
Signed-off-by: Andrew Bradford <andrew.bradford at kodakalaris.com>
---
.../bitbake-user-manual-fetching.xml | 72 +++++++++++++++++++++-
.../bitbake-user-manual-ref-variables.xml | 11 +++-
2 files changed, 79 insertions(+), 4 deletions(-)
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml b/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml
index f168cfa..0d8bec0 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml
+++ b/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml
@@ -716,6 +716,75 @@
</para>
</section>
+ <section id='perforce-fetcher'>
+ <title>Perforce Fetcher (<filename>p4://</filename>)</title>
+
+ <para>
+ This fetcher submodule fetches code from the
+ <ulink url='https://www.perforce.com/'>Perforce</ulink>
+ source control system.
+ The executable used is specified by
+ <filename>FETCHCMD_p4</filename>, which defaults
+ to "p4".
+ The fetcher's temporary working directory is set by
+ <link linkend='var-P4DIR'><filename>P4DIR</filename></link>,
+ which is usually <filename>DL_DIR/p4</filename>.
+ </para>
+
+ <para>
+ To use this fetcher, make sure your recipe has proper
+ <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>,
+ <link linkend='var-SRCREV'><filename>SRCREV</filename></link>, and
+ <link linkend='var-PV'><filename>PV</filename></link>.
+ The p4 executable is able to use the config file defined by your
+ system's <filename>P4CONFIG</filename> environment variable in
+ order to define the Perforce server URL and port, username, and
+ password if you do not wish to keep those values in a recipe
+ itself. If you choose not to use <filename>P4CONFIG</filename>,
+ you can specify the <filename>P4PORT</filename> value,
+ which is the server's URL and port number. If you wish to
+ specify a username and password directly in your recipe, do so
+ within <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>.
+ </para>
+
+ <para>
+ Here is an example which relies on <filename>P4CONFIG</filename>
+ to specify the server URL and port, username, and password, and
+ fetches the Head Revision:
+ <literallayout class='monospaced'>
+ SRC_URI = "p4://example-depot/main/source/..."
+ SRCREV = "${AUTOREV}"
+ PV = "p4-${SRCPV}"
+ S = "${WORKDIR}/p4"
+ </literallayout>
+ </para>
+
+ <para>
+ Here is an example which specifies the server URL and port,
+ username, and password, and fetches a Revision based on a Label:
+ <literallayout class='monospaced'>
+ P4PORT = "tcp:p4server.example.net:1666"
+ SRC_URI = "p4://user:passwd at example-depot/main/source/..."
+ SRCREV = "release-1.0"
+ PV = "p4-${SRCPV}"
+ S = "${WORKDIR}/p4"
+ </literallayout>
+ </para>
+
+ <para>
+ Here are a few behaviours worth mentioning:
+ <itemizedlist>
+ <listitem><para><link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
+ should always end in <filename>/...</filename> to specify
+ fetching of all directories and files below the given depot
+ path. Fetching of an individual file does not currently
+ work correctly.</para></listitem>
+ <listitem><para><filename>S</filename> should always be set
+ to <filename>"${WORKDIR}/p4"</filename> in your recipe.</para></listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
<section id='other-fetchers'>
<title>Other Fetchers</title>
@@ -726,9 +795,6 @@
Bazaar (<filename>bzr://</filename>)
</para></listitem>
<listitem><para>
- Perforce (<filename>p4://</filename>)
- </para></listitem>
- <listitem><para>
Trees using Git Annex (<filename>gitannex://</filename>)
</para></listitem>
<listitem><para>
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.xml b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.xml
index 4d06ff9..f59fe85 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.xml
+++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.xml
@@ -52,7 +52,7 @@
<link linkend='var-MIRRORS'>M</link>
<!-- <link linkend='var-glossary-n'>N</link> -->
<link linkend='var-OVERRIDES'>O</link>
- <link linkend='var-PACKAGES'>P</link>
+ <link linkend='var-P4DIR'>P</link>
<!-- <link linkend='var-QMAKE_PROFILES'>Q</link> -->
<link linkend='var-RDEPENDS'>R</link>
<link linkend='var-SECTION'>S</link>
@@ -1748,6 +1748,15 @@
<glossdiv id='var-glossary-p'><title>P</title>
+ <glossentry id='var-P4DIR'><glossterm>P4DIR</glossterm>
+ <glossdef>
+ <para>
+ The directory in which a local copy of a Perforce depot
+ is stored when it is fetched.
+ </para>
+ </glossdef>
+ </glossentry>
+
<glossentry id='var-PACKAGES'><glossterm>PACKAGES</glossterm>
<glossdef>
<para>The list of packages the recipe creates.
--
2.8.1
More information about the bitbake-devel
mailing list