summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2024-05-01 21:34:02 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-05-02 15:15:51 +0100
commit808f700efcb98f5344c18db6c91b83a9e4bd15e8 (patch)
tree0e817ed83944ae935d3e5123dea39dbbf70f51ba /meta/lib/oe
parent812dafbec1918fbbf89e8466988da602bf5edee0 (diff)
downloadpoky-808f700efcb98f5344c18db6c91b83a9e4bd15e8.tar.gz
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>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r--meta/lib/oe/patch.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 60a0cc8291..58c6e34fe8 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -882,7 +882,7 @@ class UserResolver(Resolver):
882 os.chdir(olddir) 882 os.chdir(olddir)
883 883
884 884
885def patch_path(url, fetch, workdir, expand=True): 885def patch_path(url, fetch, unpackdir, expand=True):
886 """Return the local path of a patch, or return nothing if this isn't a patch""" 886 """Return the local path of a patch, or return nothing if this isn't a patch"""
887 887
888 local = fetch.localpath(url) 888 local = fetch.localpath(url)
@@ -891,7 +891,7 @@ def patch_path(url, fetch, workdir, expand=True):
891 base, ext = os.path.splitext(os.path.basename(local)) 891 base, ext = os.path.splitext(os.path.basename(local))
892 if ext in ('.gz', '.bz2', '.xz', '.Z'): 892 if ext in ('.gz', '.bz2', '.xz', '.Z'):
893 if expand: 893 if expand:
894 local = os.path.join(workdir, base) 894 local = os.path.join(unpackdir, base)
895 ext = os.path.splitext(base)[1] 895 ext = os.path.splitext(base)[1]
896 896
897 urldata = fetch.ud[url] 897 urldata = fetch.ud[url]
@@ -905,12 +905,12 @@ def patch_path(url, fetch, workdir, expand=True):
905 return local 905 return local
906 906
907def src_patches(d, all=False, expand=True): 907def src_patches(d, all=False, expand=True):
908 workdir = d.getVar('WORKDIR') 908 unpackdir = d.getVar('UNPACKDIR')
909 fetch = bb.fetch2.Fetch([], d) 909 fetch = bb.fetch2.Fetch([], d)
910 patches = [] 910 patches = []
911 sources = [] 911 sources = []
912 for url in fetch.urls: 912 for url in fetch.urls:
913 local = patch_path(url, fetch, workdir, expand) 913 local = patch_path(url, fetch, unpackdir, expand)
914 if not local: 914 if not local:
915 if all: 915 if all:
916 local = fetch.localpath(url) 916 local = fetch.localpath(url)