summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2024-04-25 16:59:54 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-04-26 22:11:31 +0100
commit853ba9faccd53e1bcc3f899bdbfd5ebdea389a3f (patch)
treeb135487151a22c7c5e644feb5c422e9da571570a /meta
parent34829ed7a20482118af01c3fdde857bc53faaa4c (diff)
downloadopenembedded-core-853ba9faccd53e1bcc3f899bdbfd5ebdea389a3f.tar.gz
base/bitbake.conf: Introduce UNPACKDIR
Having the unpack directory hardcoded to WORKDIR makes it really hard to make any changes to the unpack process to try and allow for cleanup for example. As a first step toward unraveling the intertwined location usages, add a variable, UNPACKDIR which is where the fetcher is asked to unpack fetched sources. It defaults to the existing value of WORKDIR at this point. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes-global/base.bbclass4
-rw-r--r--meta/conf/bitbake.conf1
2 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass
index 0999b42daa..066f3848f7 100644
--- a/meta/classes-global/base.bbclass
+++ b/meta/classes-global/base.bbclass
@@ -153,7 +153,7 @@ python base_do_fetch() {
}
addtask unpack after do_fetch
-do_unpack[dirs] = "${WORKDIR}"
+do_unpack[dirs] = "${UNPACKDIR}"
do_unpack[cleandirs] = "${@d.getVar('S') if os.path.normpath(d.getVar('S')) != os.path.normpath(d.getVar('WORKDIR')) else os.path.join('${S}', 'patches')}"
@@ -164,7 +164,7 @@ python base_do_unpack() {
try:
fetcher = bb.fetch2.Fetch(src_uri, d)
- fetcher.unpack(d.getVar('WORKDIR'))
+ fetcher.unpack(d.getVar('UNPACKDIR'))
except bb.fetch2.BBFetchException as e:
bb.fatal("Bitbake Fetcher Error: " + repr(e))
}
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index ba8bd5f975..b2c500d873 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -405,6 +405,7 @@ STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${PV}"
STAMPCLEAN = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/*-*"
BASE_WORKDIR ?= "${TMPDIR}/work"
WORKDIR = "${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}/${PN}/${PV}"
+UNPACKDIR ??= "${WORKDIR}"
T = "${WORKDIR}/temp"
D = "${WORKDIR}/image"
S = "${WORKDIR}/${BP}"