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 08:08:20 +0000 |
commit | 7392ecd559ef71241405c704a65da171ee216ca1 (patch) | |
tree | dfee3b019e0dd3214eb0f71a2842f347e7d786bc /scripts | |
parent | 611c27182a6e52e159a1ce1b5bac054405c611d2 (diff) | |
download | openembedded-core-7392ecd559ef71241405c704a65da171ee216ca1.tar.gz openembedded-core-7392ecd559ef71241405c704a65da171ee216ca1.tar.bz2 openembedded-core-7392ecd559ef71241405c704a65da171ee216ca1.zip |
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.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-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): (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=args.srctree) 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) workdir = rd.getVar('WORKDIR', True) - 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) + if s.startswith(workdir): + # Handle if S is set to a subdirectory of the source + 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') if not os.path.exists(appendpath): |