]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/devtool/standard: Fix patch cleanup
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 25 Jun 2015 15:09:14 +0000 (16:09 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 26 Jun 2015 08:25:51 +0000 (09:25 +0100)
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]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/devtool/standard.py

index 4d3ff02be8d66c8b067c1a0cc9ef412430357ff8..ea21877b18a050512d9b821d0a404777478f7dc1 100644 (file)
@@ -299,6 +299,7 @@ def _extract_source(srctree, keep_temp, devbranch, d):
         logger.info('Unpacking...')
         task_executor.exec_func('do_unpack', False)
         srcsubdir = crd.getVar('S', True)
+        patchsubdir = srcsubdir
         if srcsubdir == workdir:
             # Find non-patch sources that were "unpacked" to srctree directory
             recipe_patches = [os.path.basename(patch) for patch in
@@ -319,7 +320,7 @@ def _extract_source(srctree, keep_temp, devbranch, d):
 
         scriptutils.git_convert_standalone_clone(srcsubdir)
 
-        patchdir = os.path.join(srcsubdir, 'patches')
+        patchdir = os.path.join(patchsubdir, 'patches')
         haspatches = False
         if os.path.exists(patchdir):
             if os.listdir(patchdir):