From f9e7fba02f2edefec39894c5d022e8e817cdf074 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Mon, 10 Apr 2017 10:30:36 -0700 Subject: dev-manual, ref-manual: Created new section on linear revision for packages Fixes [YOCTO #10995] For the dev-manual, I added a new section on incrementing package revision numbers that explains how the build system uses various variables to create linearly numbered revisions for packages. For the ref-manual, I cross-referenced into the new section from the AUTOSRC and SRCREV variables. (From yocto-docs rev: 53c3092e0f0293f4db0a88659abb4cf1c93f208c) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../dev-manual/dev-manual-common-tasks.xml | 101 ++++++++++++++++++++- documentation/ref-manual/ref-variables.xml | 22 +++-- 2 files changed, 111 insertions(+), 12 deletions(-) (limited to 'documentation') diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index a6e14bb93c..28a97f14bc 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml @@ -7791,6 +7791,9 @@ Excluding packages from an image + + Incrementing a package version number + Incrementing a package revision number @@ -7850,8 +7853,8 @@ -
- Incrementing a Package Revision Number +
+ Incrementing a Package Version Number If a committed change results in changing the package output, @@ -7861,9 +7864,11 @@ Increasing PR occurs one of two ways: Automatically using a Package Revision - Service (PR Service). + Service (PR Service). + Manually incrementing the - PR variable. + PR variable. + @@ -7873,9 +7878,13 @@ with existing package manager applications such as RPM, APT, and OPKG, using an automated system is much preferred over a manual system. - In either system, the main requirement is that version + In either system, the main requirement is that package version numbering increases in a linear fashion and that a number of version components exist that support that linear progression. + For information on how to ensure package revisioning remains + linear, see the + "Incrementing a Package Revision Number" + section. @@ -8084,6 +8093,88 @@
+
+ Incrementing a Package Revision Number + + + When fetching a repository, BitBake uses the + SRCREV + variable to determine the specific revision from which to + build. + You set the SRCREV variable to + AUTOREV + to cause the OpenEmbedded build system to automatically use the + latest revision of the package: + + SRCREV = "${AUTOREV}" + + + + + Furthermore, the SRCPV variable returns + the version string of the current package. + This string is used to help define the value of + PV. + If your recipe needs to define the package version (i.e. + PV), + they do this with the help of SRCPV. + Here is an example: + + PV = "1.0+git${SRCPV}" + + You can use SRCPV, as shown in the + previous example, to automatically update the package version + whenever the revision of the package changes. + The OpenEmbedded build system substitutes + SRCPV with the following: + + AUTOINC+source_revision + + The build system replaces the AUTOINC with + a number. + The number used depends on the state of the PR Service: + + + If PR Service is enabled, the build system increments + the number, which is similar to the behavior of + PR. + This behavior results in linearly increasing package + versions, which is desirable. + Here is an example: + + hello-world-git_0.0+git0+b6558dd387-r0.0_armv7a-neon.ipk + hello-world-git_0.0+git1+dd2f5c3565-r0.0_armv7a-neon.ipk + + + + If PR Service is not enabled, the build system + replaces the AUTOINC + placeholder with zero (i.e. "0"). + This results in changing the package version since + the source revision is included. + However, package versions are not increased linearly. + Here is an example: + + hello-world-git_0.0+git0+b6558dd387-r0.0_armv7a-neon.ipk + hello-world-git_0.0+git0+dd2f5c3565-r0.0_armv7a-neon.ipk + + + + + + + In summary, the OpenEmbedded build system does not track the + history of package versions for this purpose. + AUTOINC, in this case, is comparable to + PR. + If PR server is not enabled, AUTOINC + in the package version is simply replaced by "0". + If PR server is enabled, the build system keeps track of the + package versions and bumps the number when the package + revision changes. + +
+
Handling Optional Module Packaging diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml index ae2abdeddc..2671e3cb4d 100644 --- a/documentation/ref-manual/ref-variables.xml +++ b/documentation/ref-manual/ref-variables.xml @@ -484,6 +484,12 @@ in your recipe so that it does contain ${SRCPV}. + + + For more information see the + "Incrementing a Package Revision Number" + section in the Yocto Project Development Manual. + @@ -12679,15 +12685,17 @@ recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3" every time BitBake parses your recipe, you should specify a SRCREV that is a full revision identifier and not just a tag. + + For information on limitations when inheriting the + latest revision of software using + SRCREV, see the + AUTOREV + variable description and the + "Incrementing a Package Revision Number" + section, which is in the Yocto Project Development Manual. + - - For information on limitations when inheriting the latest - revision of software using SRCREV, - see the - AUTOREV - variable description. - -- cgit v1.2.3-54-g00ecf