summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/standard.py
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:14:05 +0100
commitf5ea48cb126119ec09dee4c252db4f9b1cbbf3de (patch)
treea7f25051ead86dbd849edd81ce0886ccb4404e09 /scripts/lib/devtool/standard.py
parent962f8a499ead073b4371df7243082df7a7ec4c9f (diff)
downloadpoky-f5ea48cb126119ec09dee4c252db4f9b1cbbf3de.tar.gz
devtool: slight simplification of path splitting logic
(From OE-Core rev: 762ca3e8d78d4dd22f7be045082052ad20b71e50) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/standard.py')
-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):
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):