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:51 +0100
commit812dafbec1918fbbf89e8466988da602bf5edee0 (patch)
tree3db810e9589c288ac87b7abf501c44e1d9418d99 /meta/classes-global
parent8d79ca14786c9dcdaaaf3b592c481d36fd2767b5 (diff)
downloadpoky-812dafbec1918fbbf89e8466988da602bf5edee0.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. (From OE-Core rev: e022d62ba917790af2121da57646271ef17c03fa) 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() {
153} 153}
154 154
155addtask unpack after do_fetch 155addtask unpack after do_fetch
156do_unpack[dirs] = "${WORKDIR}" 156do_unpack[dirs] = "${UNPACKDIR}"
157 157
158do_unpack[cleandirs] = "${@d.getVar('S') if os.path.normpath(d.getVar('S')) != os.path.normpath(d.getVar('WORKDIR')) else os.path.join('${S}', 'patches')}" 158do_unpack[cleandirs] = "${@d.getVar('S') if os.path.normpath(d.getVar('S')) != os.path.normpath(d.getVar('WORKDIR')) else os.path.join('${S}', 'patches')}"
159 159
@@ -164,7 +164,7 @@ python base_do_unpack() {
164 164
165 try: 165 try:
166 fetcher = bb.fetch2.Fetch(src_uri, d) 166 fetcher = bb.fetch2.Fetch(src_uri, d)
167 fetcher.unpack(d.getVar('WORKDIR')) 167 fetcher.unpack(d.getVar('UNPACKDIR'))
168 except bb.fetch2.BBFetchException as e: 168 except bb.fetch2.BBFetchException as e:
169 bb.fatal("Bitbake Fetcher Error: " + repr(e)) 169 bb.fatal("Bitbake Fetcher Error: " + repr(e))
170} 170}