diff options
| author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-02-19 16:40:02 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-23 17:35:29 +0000 |
| commit | 62a41b412f2a4079614a2bc5e29210cfb316ba64 (patch) | |
| tree | b9e6dc1e834a022a91fd2eb67204b0ee4815e873 /scripts/lib | |
| parent | e2ce29fef25b8eba8fa6cec0a87c5412b51ec813 (diff) | |
| download | poky-62a41b412f2a4079614a2bc5e29210cfb316ba64.tar.gz | |
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>
Diffstat (limited to 'scripts/lib')
| -rw-r--r-- | scripts/lib/devtool/standard.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 9ab3aa608c..4cb03f3a54 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
| @@ -313,12 +313,14 @@ def modify(args, config, basepath, workspace): | |||
| 313 | (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=args.srctree) | 313 | (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=args.srctree) |
| 314 | initial_rev = stdout.rstrip() | 314 | initial_rev = stdout.rstrip() |
| 315 | 315 | ||
| 316 | # Handle if S is set to a subdirectory of the source | 316 | # Check that recipe isn't using a shared workdir |
| 317 | s = rd.getVar('S', True) | 317 | s = rd.getVar('S', True) |
| 318 | workdir = rd.getVar('WORKDIR', True) | 318 | workdir = rd.getVar('WORKDIR', True) |
| 319 | if s != workdir and os.path.dirname(s) != workdir: | 319 | if s.startswith(workdir): |
| 320 | srcsubdir = os.sep.join(os.path.relpath(s, workdir).split(os.sep)[1:]) | 320 | # Handle if S is set to a subdirectory of the source |
| 321 | srctree = os.path.join(srctree, srcsubdir) | 321 | if s != workdir and os.path.dirname(s) != workdir: |
| 322 | srcsubdir = os.sep.join(os.path.relpath(s, workdir).split(os.sep)[1:]) | ||
| 323 | srctree = os.path.join(srctree, srcsubdir) | ||
| 322 | 324 | ||
| 323 | appendpath = os.path.join(config.workspace_path, 'appends') | 325 | appendpath = os.path.join(config.workspace_path, 'appends') |
| 324 | if not os.path.exists(appendpath): | 326 | if not os.path.exists(appendpath): |
