diff options
Diffstat (limited to 'scripts/lib')
| -rw-r--r-- | scripts/lib/devtool/standard.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 4b9cebb210..c92c9aed31 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
| @@ -464,13 +464,12 @@ def modify(args, config, basepath, workspace): | |||
| 464 | initial_rev = stdout.rstrip() | 464 | initial_rev = stdout.rstrip() |
| 465 | 465 | ||
| 466 | # Check that recipe isn't using a shared workdir | 466 | # Check that recipe isn't using a shared workdir |
| 467 | s = rd.getVar('S', True) | 467 | s = os.path.abspath(rd.getVar('S', True)) |
| 468 | workdir = rd.getVar('WORKDIR', True) | 468 | workdir = os.path.abspath(rd.getVar('WORKDIR', True)) |
| 469 | if s.startswith(workdir): | 469 | if s.startswith(workdir) and s != workdir and os.path.dirname(s) != workdir: |
| 470 | # Handle if S is set to a subdirectory of the source | 470 | # Handle if S is set to a subdirectory of the source |
| 471 | if s != workdir and os.path.dirname(s) != workdir: | 471 | srcsubdir = os.path.relpath(s, workdir).split(os.sep, 1)[1] |
| 472 | srcsubdir = os.sep.join(os.path.relpath(s, workdir).split(os.sep)[1:]) | 472 | srctree = os.path.join(srctree, srcsubdir) |
| 473 | srctree = os.path.join(srctree, srcsubdir) | ||
| 474 | 473 | ||
| 475 | appendpath = os.path.join(config.workspace_path, 'appends') | 474 | appendpath = os.path.join(config.workspace_path, 'appends') |
| 476 | if not os.path.exists(appendpath): | 475 | if not os.path.exists(appendpath): |
