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

View File

@@ -101,7 +101,7 @@ def determine_file_source(targetpath, rd):
import oe.recipeutils
# See if it's in do_install for the recipe
workdir = rd.getVar('WORKDIR')
unpackdir = rd.getVar('UNPACKDIR')
src_uri = rd.getVar('SRC_URI')
srcfile = ''
modpatches = []
@@ -113,9 +113,9 @@ def determine_file_source(targetpath, rd):
if not srcpath.startswith('/'):
# Handle non-absolute path
srcpath = os.path.abspath(os.path.join(rd.getVarFlag('do_install', 'dirs').split()[-1], srcpath))
if srcpath.startswith(workdir):
if srcpath.startswith(unpackdir):
# OK, now we have the source file name, look for it in SRC_URI
workdirfile = os.path.relpath(srcpath, workdir)
workdirfile = os.path.relpath(srcpath, unpackdir)
# FIXME this is where we ought to have some code in the fetcher, because this is naive
for item in src_uri.split():
localpath = bb.fetch2.localpath(item, rd)