When fetching a repository, BitBake uses the
SRCREV
variable to determine the specific source code 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 software:
SRCREV = "${AUTOREV}"
Furthermore, you need to reference SRCPV
in PV
in order to automatically update
the version whenever the revision of the source code
changes.
Here is an example:
PV = "1.0+git${SRCPV}"
The OpenEmbedded build system substitutes
SRCPV
with the following:
AUTOINC+source_code_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 binary 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.