1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-02 13:29:49 +00:00

classes/lib/scripts: Initial WORKDIR -> UNPACKDIR updates

Work through the initial issues I found where we need to change WORKDIR
to UNPACKDIR.

(From OE-Core rev: 86fec41b1e809d1a2fa2feadc26d29020df53d39)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2024-05-01 21:34:02 +01:00
parent 812dafbec1
commit 808f700efc
5 changed files with 30 additions and 30 deletions
+4 -4
View File
@@ -882,7 +882,7 @@ class UserResolver(Resolver):
os.chdir(olddir)
def patch_path(url, fetch, workdir, expand=True):
def patch_path(url, fetch, unpackdir, expand=True):
"""Return the local path of a patch, or return nothing if this isn't a patch"""
local = fetch.localpath(url)
@@ -891,7 +891,7 @@ def patch_path(url, fetch, workdir, expand=True):
base, ext = os.path.splitext(os.path.basename(local))
if ext in ('.gz', '.bz2', '.xz', '.Z'):
if expand:
local = os.path.join(workdir, base)
local = os.path.join(unpackdir, base)
ext = os.path.splitext(base)[1]
urldata = fetch.ud[url]
@@ -905,12 +905,12 @@ def patch_path(url, fetch, workdir, expand=True):
return local
def src_patches(d, all=False, expand=True):
workdir = d.getVar('WORKDIR')
unpackdir = d.getVar('UNPACKDIR')
fetch = bb.fetch2.Fetch([], d)
patches = []
sources = []
for url in fetch.urls:
local = patch_path(url, fetch, workdir, expand)
local = patch_path(url, fetch, unpackdir, expand)
if not local:
if all:
local = fetch.localpath(url)