Skip to contentSkip to conversation

devtool: modify command fails to ignore source

PATCH Superseded Stephano Cetola 1 participant 2 messages Oct 5, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 devtool: modify command fails to ignore source

changed since V3:
added a check for the case where $S = $WORKDIR

fixes [YOCTO #10379]

Stephano Cetola (1):
devtool: modify command fails to ignore source files

 scripts/lib/devtool/standard.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
Signature · 1 line
2.10.0
#1 lore raw

PATCH v4 1/1 devtool: modify command fails to ignore source files

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

---
 scripts/lib/devtool/standard.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
scripts/lib/devtool/standard.py +7 -1
index 4b9b173..4eff6f8 100644
@@ -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),
Signature · 1 line
2.10.0