summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-25 16:09:14 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-08 13:07:15 +0100
commit59774355387e11747e384b2d11864e4c95896aa3 (patch)
tree9e980e66af8184a36bb831f6392474a7557ef533 /scripts/lib/devtool
parent5cdbf0ad06e617f49099618a36b9d15cce9b0965 (diff)
downloadpoky-59774355387e11747e384b2d11864e4c95896aa3.tar.gz
lib/devtool/standard: Fix patch cleanup
If patches fail to apply with git, quilt it used as a fallback. If that happens, the code in this class is meant to handle cleanup of these patch files. In the case where ${S} is a subdir of the git tree, the code doesn't correctly set the patches directory. This change correctly sets the patches directory (which is different to the location of the git repository). [YOCTO #7911] (From OE-Core master rev: de6e0f3af5e858960676ea291036e59105fd806f) (From OE-Core rev: 03dbc60c165a511894d1ae10ac1d90c1fadcc268) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool')
-rw-r--r--scripts/lib/devtool/standard.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index d9b5d15279..a459c7b57c 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -237,13 +237,14 @@ def _extract_source(srctree, keep_temp, devbranch, d):
237 logger.info('Unpacking...') 237 logger.info('Unpacking...')
238 exec_task_func('do_unpack', False) 238 exec_task_func('do_unpack', False)
239 srcsubdir = crd.getVar('S', True) 239 srcsubdir = crd.getVar('S', True)
240 patchsubdir = srcsubdir
240 if srcsubdir != workdir and os.path.dirname(srcsubdir) != workdir: 241 if srcsubdir != workdir and os.path.dirname(srcsubdir) != workdir:
241 # Handle if S is set to a subdirectory of the source 242 # Handle if S is set to a subdirectory of the source
242 srcsubdir = os.path.join(workdir, os.path.relpath(srcsubdir, workdir).split(os.sep)[0]) 243 srcsubdir = os.path.join(workdir, os.path.relpath(srcsubdir, workdir).split(os.sep)[0])
243 244
244 scriptutils.git_convert_standalone_clone(srcsubdir) 245 scriptutils.git_convert_standalone_clone(srcsubdir)
245 246
246 patchdir = os.path.join(srcsubdir, 'patches') 247 patchdir = os.path.join(patchsubdir, 'patches')
247 haspatches = False 248 haspatches = False
248 if os.path.exists(patchdir): 249 if os.path.exists(patchdir):
249 if os.listdir(patchdir): 250 if os.listdir(patchdir):