summaryrefslogtreecommitdiffstats
path: root/meta/classes-global
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-05-02 15:15:26 +0100
commite022d62ba917790af2121da57646271ef17c03fa (patch)
treede5835f35d420f6d4570d287b25e441dd07116ec /meta/classes-global
parentd1b25413ced62dc2927dae57b8d16e67d15dc220 (diff)
downloadopenembedded-core-contrib-e022d62ba917790af2121da57646271ef17c03fa.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/classes-global')
-rw-r--r--meta/classes-global/base.bbclass4
1 files changed, 2 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))
}