summaryrefslogtreecommitdiffstats
path: root/scripts/lib
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-06-26 09:27:30 +0100
commite8c50a2b7fe229cde8f00896ec7e908b280215ec (patch)
tree98c2f9e0f1bcb27299b6cd11ac99253d84647306 /scripts/lib
parentd85231ef140265868b29bbffb6a5e36fd757cf1b (diff)
downloadpoky-e8c50a2b7fe229cde8f00896ec7e908b280215ec.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 rev: de6e0f3af5e858960676ea291036e59105fd806f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-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 4d3ff02be8..ea21877b18 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -299,6 +299,7 @@ def _extract_source(srctree, keep_temp, devbranch, d):
299 logger.info('Unpacking...') 299 logger.info('Unpacking...')
300 task_executor.exec_func('do_unpack', False) 300 task_executor.exec_func('do_unpack', False)
301 srcsubdir = crd.getVar('S', True) 301 srcsubdir = crd.getVar('S', True)
302 patchsubdir = srcsubdir
302 if srcsubdir == workdir: 303 if srcsubdir == workdir:
303 # Find non-patch sources that were "unpacked" to srctree directory 304 # Find non-patch sources that were "unpacked" to srctree directory
304 recipe_patches = [os.path.basename(patch) for patch in 305 recipe_patches = [os.path.basename(patch) for patch in
@@ -319,7 +320,7 @@ def _extract_source(srctree, keep_temp, devbranch, d):
319 320
320 scriptutils.git_convert_standalone_clone(srcsubdir) 321 scriptutils.git_convert_standalone_clone(srcsubdir)
321 322
322 patchdir = os.path.join(srcsubdir, 'patches') 323 patchdir = os.path.join(patchsubdir, 'patches')
323 haspatches = False 324 haspatches = False
324 if os.path.exists(patchdir): 325 if os.path.exists(patchdir):
325 if os.listdir(patchdir): 326 if os.listdir(patchdir):