diff options
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/contributor-guide/recipe-style-guide.rst | 6 | ||||
-rw-r--r-- | documentation/dev-manual/external-scm.rst | 9 | ||||
-rw-r--r-- | documentation/dev-manual/new-recipe.rst | 10 | ||||
-rw-r--r-- | documentation/dev-manual/packages.rst | 13 | ||||
-rw-r--r-- | documentation/kernel-dev/common.rst | 13 | ||||
-rw-r--r-- | documentation/ref-manual/variables.rst | 59 |
6 files changed, 47 insertions, 63 deletions
diff --git a/documentation/contributor-guide/recipe-style-guide.rst b/documentation/contributor-guide/recipe-style-guide.rst index 179c8daa77..617e202431 100644 --- a/documentation/contributor-guide/recipe-style-guide.rst +++ b/documentation/contributor-guide/recipe-style-guide.rst | |||
@@ -47,10 +47,10 @@ Debian policy closely. | |||
47 | 47 | ||
48 | When a recipe references a git revision that does not correspond to a released | 48 | When a recipe references a git revision that does not correspond to a released |
49 | version of software (e.g. is not a tagged version), the :term:`PV` variable | 49 | version of software (e.g. is not a tagged version), the :term:`PV` variable |
50 | should include the Git revision using the following to make the | 50 | should include the sign ``+``, so :term:`bitbake` automatically includes package |
51 | version clear:: | 51 | version information during the packaging phase:: |
52 | 52 | ||
53 | PV = "<version>+git${SRCPV}" | 53 | PV = "<version>+git" |
54 | 54 | ||
55 | In this case, ``<version>`` should be the most recently released version of the | 55 | In this case, ``<version>`` should be the most recently released version of the |
56 | software from the current source revision (``git describe`` can be useful for | 56 | software from the current source revision (``git describe`` can be useful for |
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 | |||
12 | Subversion (SVN), Git, and Bazaar (BZR) repositories. | 12 | Subversion (SVN), Git, and Bazaar (BZR) repositories. |
13 | 13 | ||
14 | To enable this behavior, the :term:`PV` of | 14 | To enable this behavior, the :term:`PV` of |
15 | the recipe needs to reference | 15 | the recipe needs to include a ``+`` sign in its assignment. |
16 | :term:`SRCPV`. Here is an example:: | 16 | Here 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` | ||
21 | during the packaging phase. | ||
19 | 22 | ||
20 | Then, you can add the following to your | 23 | Then, 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 | ||
292 | Another way of specifying source is from an SCM. For Git repositories, | 292 | Another way of specifying source is from an SCM. For Git repositories, |
293 | you must specify :term:`SRCREV` and you should specify :term:`PV` to include | 293 | you must specify :term:`SRCREV` and you should specify :term:`PV` to include |
294 | the revision with :term:`SRCPV`. Here is an example from the recipe | 294 | a ``+`` 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 | ||
302 | If your :term:`SRC_URI` statement includes URLs pointing to individual files | 302 | If your :term:`SRC_URI` statement includes URLs pointing to individual files |
303 | fetched from a remote server other than a version control system, | 303 | fetched 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 | ||
259 | Furthermore, you need to reference :term:`SRCPV` in :term:`PV` in order to | 255 | Furthermore, you need to include a ``+`` sign in :term:`PV` in order to |
260 | automatically update the version whenever the revision of the source | 256 | automatically update the version whenever the revision of the source |
261 | code changes. Here is an example:: | 257 | code changes. Here is an example:: |
262 | 258 | ||
263 | PV = "1.0+git${SRCPV}" | 259 | PV = "1.0+git" |
264 | |||
265 | The OpenEmbedded build system substitutes :term:`SRCPV` with the following: | ||
266 | 260 | ||
267 | .. code-block:: none | 261 | The OpenEmbedded build system will automatically add the source control |
262 | information 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 | ||
diff --git a/documentation/kernel-dev/common.rst b/documentation/kernel-dev/common.rst index fda41694dc..28ef3b22c3 100644 --- a/documentation/kernel-dev/common.rst +++ b/documentation/kernel-dev/common.rst | |||
@@ -1562,16 +1562,9 @@ Here are some basic steps you can use to work with your own sources: | |||
1562 | changed. | 1562 | changed. |
1563 | 1563 | ||
1564 | - :term:`PV`: The default :term:`PV` | 1564 | - :term:`PV`: The default :term:`PV` |
1565 | assignment is typically adequate. It combines the | 1565 | assignment is typically adequate. It combines the value of |
1566 | :term:`LINUX_VERSION` with the Source Control Manager (SCM) revision | 1566 | :term:`LINUX_VERSION` and the value ``+git`` which adds source control |
1567 | as derived from the :term:`SRCPV` | 1567 | information to :term:`PKGV` later during the packaging phase. |
1568 | variable. The combined results are a string with the following | ||
1569 | form:: | ||
1570 | |||
1571 | 3.19.11+git1+68a635bf8dfb64b02263c1ac80c948647cc76d5f_1+218bd8d2022b9852c60d32f0d770931e3cf343e2 | ||
1572 | |||
1573 | While lengthy, the extra verbosity in :term:`PV` helps ensure you are | ||
1574 | using the exact sources from which you intend to build. | ||
1575 | 1568 | ||
1576 | - :term:`COMPATIBLE_MACHINE`: | 1569 | - :term:`COMPATIBLE_MACHINE`: |
1577 | A list of the machines supported by your new recipe. This variable | 1570 | A list of the machines supported by your new recipe. This variable |
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index 0c5c7aab97..2e57abe16c 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst | |||
@@ -209,12 +209,11 @@ system and gives an overview of their function and contents. | |||
209 | SRCREV = "${AUTOREV}" | 209 | SRCREV = "${AUTOREV}" |
210 | 210 | ||
211 | If you use the previous statement to retrieve the latest version of | 211 | If you use the previous statement to retrieve the latest version of |
212 | software, you need to be sure :term:`PV` contains | 212 | software, you need to make sure :term:`PV` contains the ``+`` sign so |
213 | ``${``\ :term:`SRCPV`\ ``}``. For example, suppose you have a kernel | 213 | :term:`bitbake` includes source control information to :term:`PKGV` when |
214 | recipe that inherits the :ref:`ref-classes-kernel` class and you | 214 | packaging the recipe. For example:: |
215 | use the previous statement. In this example, ``${SRCPV}`` does not | 215 | |
216 | automatically get into :term:`PV`. Consequently, you need to change | 216 | PV = "6.10.y+git" |
217 | :term:`PV` in your recipe so that it does contain ``${SRCPV}``. | ||
218 | 217 | ||
219 | For more information see the | 218 | For more information see the |
220 | ":ref:`dev-manual/packages:automatically incrementing a package version number`" | 219 | ":ref:`dev-manual/packages:automatically incrementing a package version number`" |
@@ -5109,7 +5108,7 @@ system and gives an overview of their function and contents. | |||
5109 | The :term:`LINUX_VERSION` variable is used to define :term:`PV` | 5108 | The :term:`LINUX_VERSION` variable is used to define :term:`PV` |
5110 | for the recipe:: | 5109 | for the recipe:: |
5111 | 5110 | ||
5112 | PV = "${LINUX_VERSION}+git${SRCPV}" | 5111 | PV = "${LINUX_VERSION}+git" |
5113 | 5112 | ||
5114 | :term:`LINUX_VERSION_EXTENSION` | 5113 | :term:`LINUX_VERSION_EXTENSION` |
5115 | A string extension compiled into the version string of the Linux | 5114 | A string extension compiled into the version string of the Linux |
@@ -6657,22 +6656,14 @@ system and gives an overview of their function and contents. | |||
6657 | string. You cannot use the wildcard character in any other | 6656 | string. You cannot use the wildcard character in any other |
6658 | location of the string. | 6657 | location of the string. |
6659 | 6658 | ||
6660 | The specified version is matched against :term:`PV`, which | 6659 | The specified version is matched against :term:`PV`, which does not |
6661 | does not necessarily match the version part of the recipe's filename. | 6660 | necessarily match the version part of the recipe's filename. |
6662 | For example, consider two recipes ``foo_1.2.bb`` and ``foo_git.bb`` | ||
6663 | where ``foo_git.bb`` contains the following assignment:: | ||
6664 | |||
6665 | PV = "1.1+git${SRCPV}" | ||
6666 | |||
6667 | In this case, the correct way to select | ||
6668 | ``foo_git.bb`` is by using an assignment such as the following:: | ||
6669 | |||
6670 | PREFERRED_VERSION_foo = "1.1+git%" | ||
6671 | 6661 | ||
6672 | Compare that previous example | 6662 | If you want to select a recipe named ``foo_git.bb`` which has :term:`PV` |
6673 | against the following incorrect example, which does not work:: | 6663 | set to ``1.2.3+git``, you can do so by setting ```PREFERRED_VERSION_foo`` |
6674 | 6664 | to ``1.2.3%`` (i.e. simply setting ``PREFERRED_VERSION_foo`` to ``git`` | |
6675 | PREFERRED_VERSION_foo = "git" | 6665 | will not work as the name of the recipe isn't used, but rather its |
6666 | :term:`PV` definition). | ||
6676 | 6667 | ||
6677 | Sometimes the :term:`PREFERRED_VERSION` variable can be set by | 6668 | Sometimes the :term:`PREFERRED_VERSION` variable can be set by |
6678 | configuration files in a way that is hard to change. You can use | 6669 | configuration files in a way that is hard to change. You can use |
@@ -8194,21 +8185,23 @@ system and gives an overview of their function and contents. | |||
8194 | (SCM). | 8185 | (SCM). |
8195 | 8186 | ||
8196 | :term:`SRCPV` | 8187 | :term:`SRCPV` |
8197 | Returns the version string of the current package. This string is | 8188 | The variable :term:`SRCPV` is deprecated. It was previously used to |
8198 | used to help define the value of :term:`PV`. | 8189 | include source control information in :term:`PV` for :term:`bitbake` to |
8190 | work correctly but this is no longer a requirement. Source control | ||
8191 | information will be automatically included by :term:`bitbake` in the | ||
8192 | variable :term:`PKGV` during packaging if the ``+`` sign is present in | ||
8193 | :term:`PV`. | ||
8199 | 8194 | ||
8200 | The :term:`SRCPV` variable is defined in the ``meta/conf/bitbake.conf`` | 8195 | .. note:: |
8201 | configuration file in the :term:`Source Directory` as | ||
8202 | follows:: | ||
8203 | 8196 | ||
8204 | SRCPV = "${@bb.fetch2.get_srcrev(d)}" | 8197 | The :term:`SRCPV` variable used to be defined in the |
8198 | ``meta/conf/bitbake.conf`` configuration file in the :term:`Source | ||
8199 | Directory` as follows:: | ||
8205 | 8200 | ||
8206 | Recipes that need to define :term:`PV` do so with the help of the | 8201 | SRCPV = "${@bb.fetch2.get_srcrev(d)}" |
8207 | :term:`SRCPV`. For example, the ``ofono`` recipe (``ofono_git.bb``) | ||
8208 | located in ``meta/recipes-connectivity`` in the Source Directory | ||
8209 | defines :term:`PV` as follows:: | ||
8210 | 8202 | ||
8211 | PV = "0.12-git${SRCPV}" | 8203 | The ``get_srcrev`` function can still be used to include source control |
8204 | information in variables manually. | ||
8212 | 8205 | ||
8213 | :term:`SRCREV` | 8206 | :term:`SRCREV` |
8214 | The revision of the source code used to build the package. This | 8207 | The revision of the source code used to build the package. This |