From 62afa02d01794376efab75623f42e7e08af08526 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 11 Aug 2023 13:52:59 +0100 Subject: base/package: Move source revision information from PV to PKGV Source control information being present in PV used to be a hard requirement for bitbake to operate correctly. Now that hashes are a required part of task stamps, this requirement no longer exists. This means we can defer the hash pieces to PKGV and simplify PV. Use new bitbake fetcher API to inject the source revisions directly into the hash allowing removal of some horrible code from base.bbclass and avoiding any hardcoding about how SRCREV may or may not be used. Use that API to object the string to append to PKGV and append that directly. The user visible effect of this change is that PV will no longer have revision information in it and this will now be appended to PV through PKGV when the packages are written. Since PV is used in STAMP and WORKDIR, users will see small directory naming and stamp naming changes. This will mean that sstate reuse through hash equivalence where the source revision changes but the output does not will become possible as the sstate naming will become less specific and no longer contain the revision. The SRCPV variable will no longer be needed in PV and is effectively now just a null operation. Usage can be removed over time. (From OE-Core rev: a8e7b0f932b9ea69b3a218fca18041676c65aba0) Signed-off-by: Richard Purdie --- .../gitunpackoffline/gitunpackoffline-fail.bb | 18 +++--------------- .../recipes-test/gitunpackoffline/gitunpackoffline.bb | 2 +- .../recipes-test/gitunpackoffline/gitunpackoffline.inc | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.inc (limited to 'meta-selftest') diff --git a/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline-fail.bb b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline-fail.bb index 602e895199..5146129666 100644 --- a/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline-fail.bb +++ b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline-fail.bb @@ -1,16 +1,4 @@ -SUMMARY = "Test recipe for fetching git submodules" -HOMEPAGE = "https://git.yoctoproject.org/git/matchbox-panel-2" -LICENSE = "GPL-2.0-or-later" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" +require gitunpackoffline.inc -INHIBIT_DEFAULT_DEPS = "1" - -TAGVALUE = "2.10" - -# Deliberately have a tag which has to be resolved but ensure do_unpack doesn't access the network again. -SRC_URI = "git://git.yoctoproject.org/git/matchbox-panel-2;branch=master;protocol=https" -SRC_URI:append:gitunpack-enable-recipe = ";tag=${TAGVALUE}" -SRCREV = "f82ca3f42510fb3ef10f598b393eb373a2c34ca7" -SRCREV:gitunpack-enable-recipe = "" - -S = "${WORKDIR}/git" +# Clear the base.bbclass magic srcrev call +fetcher_hashes_dummyfunc[vardepvalue] = "" diff --git a/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.bb b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.bb index 597c89b199..b051b5da5a 100644 --- a/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.bb +++ b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.bb @@ -1,4 +1,4 @@ -require gitunpackoffline-fail.bb +require gitunpackoffline.inc TAGVALUE = "2.11" diff --git a/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.inc b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.inc new file mode 100644 index 0000000000..602e895199 --- /dev/null +++ b/meta-selftest/recipes-test/gitunpackoffline/gitunpackoffline.inc @@ -0,0 +1,16 @@ +SUMMARY = "Test recipe for fetching git submodules" +HOMEPAGE = "https://git.yoctoproject.org/git/matchbox-panel-2" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +INHIBIT_DEFAULT_DEPS = "1" + +TAGVALUE = "2.10" + +# Deliberately have a tag which has to be resolved but ensure do_unpack doesn't access the network again. +SRC_URI = "git://git.yoctoproject.org/git/matchbox-panel-2;branch=master;protocol=https" +SRC_URI:append:gitunpack-enable-recipe = ";tag=${TAGVALUE}" +SRCREV = "f82ca3f42510fb3ef10f598b393eb373a2c34ca7" +SRCREV:gitunpack-enable-recipe = "" + +S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf