[v2,1/4] bitbake.conf: always start with empty SRC_URI

Message ID 20220412120813.467516-2-adriaan.schmidt@siemens.com
State Accepted, archived
Headers show
Series Improve cacheability | expand

Commit Message

Schmidt, Adriaan April 12, 2022, 4:08 a.m. UTC
As ${FILE} is an absolute path, having it in SRC_URI breaks caching.
This applies to recipes that don't set SRC_URI (e.g. meta packages
that are only there to pull dependencies), or ones that use "+="
to extend SRC_URI.

The recipe path doesn't need to be part of SRC_URI. Changes/dependencies
are tracked by bitbake, and OE/poky also sets it empty in its bitbake.conf.

Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
---
 meta/conf/bitbake.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index cd1c4a64..fdb7a5c8 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -36,7 +36,7 @@  PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'
 PROVIDES = ""
 S = "${WORKDIR}/${P}"
 AUTOREV = "${@bb.fetch2.get_autorev(d)}"
-SRC_URI = "file://${FILE}"
+SRC_URI = ""
 STAMPS_DIR ?= "${TMPDIR}/stamps"
 STAMP = "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}/${PV}-${PR}"
 STAMPCLEAN = "${STAMPS_DIR}/${DISTRO}-${DISTRO_ARCH}/${PN}/*-*"