summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual
diff options
context:
space:
mode:
authorAntonin Godard <antonin.godard@bootlin.com>2024-12-09 17:43:43 +0100
committerSteve Sakoman <steve@sakoman.com>2024-12-26 06:01:37 -0800
commite82dc2ad3c04a1499c0ea68295a94920151958f3 (patch)
treec641dcb4f7a07e6cc89b7cf33515ee15100e6edd /documentation/dev-manual
parentbca4068948e4383cc18a24a3c224bbc339f7de2a (diff)
downloadpoky-e82dc2ad3c04a1499c0ea68295a94920151958f3.tar.gz
Update the documentation for SRCPV
The variable SRCPV is deprecated since 4.3. Instead of including SRCPV in PV, including the sign "+" is enough for bitbake to add the source control information to PKGV during the packaging phase. Update the documentation for SRCPV and the places where it was used. When instructions previously referred to SRCPV, replace by mentioning to include "+" in the assignment. In most examples, "+git" is added to PV as it is the most popular SCM. Simply adding "+" is also possible, although it is better practice to include the SCM name, so give that example. Update the gcompat example with l3afpad as it didn't include "+git" in its PV definition anymore. (From yocto-docs rev: 3866c09cc0460d25fefc0c831affd89633cf8a7b) Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> (cherry picked from commit ee16c96202e5027d1a8d7e89e11c25f127c78326) Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'documentation/dev-manual')
-rw-r--r--documentation/dev-manual/external-scm.rst9
-rw-r--r--documentation/dev-manual/new-recipe.rst10
-rw-r--r--documentation/dev-manual/packages.rst13
3 files changed, 15 insertions, 17 deletions
diff --git a/documentation/dev-manual/external-scm.rst b/documentation/dev-manual/external-scm.rst
index 97a7e63e36..896b1b5ac7 100644
--- a/documentation/dev-manual/external-scm.rst
+++ b/documentation/dev-manual/external-scm.rst
@@ -12,10 +12,13 @@ revision number for changes. Currently, you can do this with Apache
12Subversion (SVN), Git, and Bazaar (BZR) repositories. 12Subversion (SVN), Git, and Bazaar (BZR) repositories.
13 13
14To enable this behavior, the :term:`PV` of 14To enable this behavior, the :term:`PV` of
15the recipe needs to reference 15the recipe needs to include a ``+`` sign in its assignment.
16:term:`SRCPV`. Here is an example:: 16Here is an example::
17 17
18 PV = "1.2.3+git${SRCPV}" 18 PV = "1.2.3+git"
19
20:term:`Bitbake` later includes the source control information in :term:`PKGV`
21during the packaging phase.
19 22
20Then, you can add the following to your 23Then, you can add the following to your
21``local.conf``:: 24``local.conf``::
diff --git a/documentation/dev-manual/new-recipe.rst b/documentation/dev-manual/new-recipe.rst
index 61fc2eb122..944b9627f9 100644
--- a/documentation/dev-manual/new-recipe.rst
+++ b/documentation/dev-manual/new-recipe.rst
@@ -291,13 +291,13 @@ another example that specifies these types of files, see the
291 291
292Another way of specifying source is from an SCM. For Git repositories, 292Another way of specifying source is from an SCM. For Git repositories,
293you must specify :term:`SRCREV` and you should specify :term:`PV` to include 293you must specify :term:`SRCREV` and you should specify :term:`PV` to include
294the revision with :term:`SRCPV`. Here is an example from the recipe 294a ``+`` sign in its definition. Here is an example from the recipe
295``meta/recipes-core/musl/gcompat_git.bb``:: 295:oe_git:`meta/recipes-sato/l3afpad/l3afpad_git.bb </openembedded-core/tree/meta/recipes-sato/l3afpad/l3afpad_git.bb>`::
296 296
297 SRC_URI = "git://git.adelielinux.org/adelie/gcompat.git;protocol=https;branch=current" 297 SRC_URI = "git://github.com/stevenhoneyman/l3afpad.git;branch=master;protocol=https"
298 298
299 PV = "1.0.0+1.1+git${SRCPV}" 299 PV = "0.8.18.1.11+git"
300 SRCREV = "af5a49e489fdc04b9cf02547650d7aeaccd43793" 300 SRCREV ="3cdccdc9505643e50f8208171d9eee5de11a42ff"
301 301
302If your :term:`SRC_URI` statement includes URLs pointing to individual files 302If your :term:`SRC_URI` statement includes URLs pointing to individual files
303fetched from a remote server other than a version control system, 303fetched from a remote server other than a version control system,
diff --git a/documentation/dev-manual/packages.rst b/documentation/dev-manual/packages.rst
index e5028fffdc..33cf78747d 100644
--- a/documentation/dev-manual/packages.rst
+++ b/documentation/dev-manual/packages.rst
@@ -84,10 +84,6 @@ the following:
84 84
85- :term:`PR`: The recipe revision. 85- :term:`PR`: The recipe revision.
86 86
87- :term:`SRCPV`: The OpenEmbedded
88 build system uses this string to help define the value of :term:`PV` when
89 the source code revision needs to be included in it.
90
91- :yocto_wiki:`PR Service </PR_Service>`: A 87- :yocto_wiki:`PR Service </PR_Service>`: A
92 network-based service that helps automate keeping package feeds 88 network-based service that helps automate keeping package feeds
93 compatible with existing package manager applications such as RPM, 89 compatible with existing package manager applications such as RPM,
@@ -256,15 +252,14 @@ the software::
256 252
257 SRCREV = "${AUTOREV}" 253 SRCREV = "${AUTOREV}"
258 254
259Furthermore, you need to reference :term:`SRCPV` in :term:`PV` in order to 255Furthermore, you need to include a ``+`` sign in :term:`PV` in order to
260automatically update the version whenever the revision of the source 256automatically update the version whenever the revision of the source
261code changes. Here is an example:: 257code changes. Here is an example::
262 258
263 PV = "1.0+git${SRCPV}" 259 PV = "1.0+git"
264
265The OpenEmbedded build system substitutes :term:`SRCPV` with the following:
266 260
267.. code-block:: none 261The OpenEmbedded build system will automatically add the source control
262information to the end of the variable :term:`PKGV`, in this format::
268 263
269 AUTOINC+source_code_revision 264 AUTOINC+source_code_revision
270 265