]> code.ossystems Code Review - openembedded-core.git/commitdiff
devtool: modify command fails to ignore source files
authorStephano Cetola <stephano.cetola@linux.intel.com>
Wed, 5 Oct 2016 17:07:17 +0000 (10:07 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 5 Oct 2016 22:22:33 +0000 (23:22 +0100)
With recent changes to recipeutils, the list of local files returned
by get_recipe_local_files could possibly include source files. This
only happens when the recipe contains a SRC_URI using subdir= to put
files in the source tree. These files should be ignored when
populating the list of local files for oe-local-files directory.

[YOCTO #10326]

introduced in
OE-Core revision 9069fef5dad5a873c8a8f720f7bcbc7625556309

Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/devtool/standard.py

index 4b9b173156d10a5fb73e5ac2080ab51ed44ac5c2..4eff6f878b0a912465992cf6a3731e3a089d2431 100644 (file)
@@ -581,8 +581,14 @@ def _extract_source(srctree, keep_temp, devbranch, sync, d):
         recipe_patches = [os.path.basename(patch) for patch in
                           oe.recipeutils.get_recipe_patches(crd)]
         local_files = oe.recipeutils.get_recipe_local_files(crd)
+
+        # Ignore local files with subdir={BP}
+        srcabspath = os.path.abspath(srcsubdir)
         local_files = [fname for fname in local_files if
-                       os.path.exists(os.path.join(workdir, fname))]
+                       os.path.exists(os.path.join(workdir, fname)) and
+                       (srcabspath == workdir or not
+                       os.path.join(workdir, fname).startswith(srcabspath +
+                           os.sep))]
         if local_files:
             for fname in local_files:
                 _move_file(os.path.join(workdir, fname),