summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2015-05-28 16:00:52 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-18 09:12:00 +0100
commit762ca3e8d78d4dd22f7be045082052ad20b71e50 (patch)
tree7a0b998c800fee45f7fee59b69885fbce68fa46b /scripts
parent06f6b20f040d2e4eee577bb2111351523ee97af2 (diff)
downloadopenembedded-core-762ca3e8d78d4dd22f7be045082052ad20b71e50.tar.gz
openembedded-core-762ca3e8d78d4dd22f7be045082052ad20b71e50.tar.bz2
openembedded-core-762ca3e8d78d4dd22f7be045082052ad20b71e50.zip
devtool: slight simplification of path splitting logic
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/devtool/standard.py11
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):
initial_rev = stdout.rstrip()
# Check that recipe isn't using a shared workdir
- s = rd.getVar('S', True)
- workdir = rd.getVar('WORKDIR', True)
- if s.startswith(workdir):
+ s = os.path.abspath(rd.getVar('S', True))
+ workdir = os.path.abspath(rd.getVar('WORKDIR', True))
+ if s.startswith(workdir) and s != workdir and os.path.dirname(s) != 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)
+ srcsubdir = os.path.relpath(s, workdir).split(os.sep, 1)[1]
+ srctree = os.path.join(srctree, srcsubdir)
appendpath = os.path.join(config.workspace_path, 'appends')
if not os.path.exists(appendpath):