[oe-commits] Richard Purdie : lib/devtool/standard: Fix patch cleanup

git at git.openembedded.org git at git.openembedded.org
Wed Jul 8 12:09:50 UTC 2015


Module: openembedded-core.git
Branch: fido
Commit: 03dbc60c165a511894d1ae10ac1d90c1fadcc268
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=03dbc60c165a511894d1ae10ac1d90c1fadcc268

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Thu Jun 25 16:09:14 2015 +0100

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)

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
Signed-off-by: Joshua Lock <joshua.lock at collabora.co.uk>

---

 scripts/lib/devtool/standard.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index d9b5d15..a459c7b 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):
         logger.info('Unpacking...')
         exec_task_func('do_unpack', False)
         srcsubdir = crd.getVar('S', True)
+        patchsubdir = srcsubdir
         if srcsubdir != workdir and os.path.dirname(srcsubdir) != workdir:
             # Handle if S is set to a subdirectory of the source
             srcsubdir = os.path.join(workdir, os.path.relpath(srcsubdir, workdir).split(os.sep)[0])
 
         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):



More information about the Openembedded-commits mailing list