mirror of
https://git.yoctoproject.org/poky
synced 2026-06-03 01:40:07 +00:00
devtool: modify: handle recipes that use a shared workdir
If S is outside of WORKDIR then we shouldn't try to get the relative path in order to work out where the source subdirectory is as we do by default. (From OE-Core rev: 7392ecd559ef71241405c704a65da171ee216ca1) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
e2ce29fef2
commit
62a41b412f
@@ -313,12 +313,14 @@ def modify(args, config, basepath, workspace):
|
|||||||
(stdout, _) = bb.process.run('git rev-parse HEAD', cwd=args.srctree)
|
(stdout, _) = bb.process.run('git rev-parse HEAD', cwd=args.srctree)
|
||||||
initial_rev = stdout.rstrip()
|
initial_rev = stdout.rstrip()
|
||||||
|
|
||||||
# Handle if S is set to a subdirectory of the source
|
# Check that recipe isn't using a shared workdir
|
||||||
s = rd.getVar('S', True)
|
s = rd.getVar('S', True)
|
||||||
workdir = rd.getVar('WORKDIR', True)
|
workdir = rd.getVar('WORKDIR', True)
|
||||||
if s != workdir and os.path.dirname(s) != workdir:
|
if s.startswith(workdir):
|
||||||
srcsubdir = os.sep.join(os.path.relpath(s, workdir).split(os.sep)[1:])
|
# Handle if S is set to a subdirectory of the source
|
||||||
srctree = os.path.join(srctree, srcsubdir)
|
if s != workdir and os.path.dirname(s) != workdir:
|
||||||
|
srcsubdir = os.sep.join(os.path.relpath(s, workdir).split(os.sep)[1:])
|
||||||
|
srctree = os.path.join(srctree, srcsubdir)
|
||||||
|
|
||||||
appendpath = os.path.join(config.workspace_path, 'appends')
|
appendpath = os.path.join(config.workspace_path, 'appends')
|
||||||
if not os.path.exists(appendpath):
|
if not os.path.exists(appendpath):
|
||||||
|
|||||||
Reference in New Issue
Block a user