Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH V3] devtool: modify command fails to ignore source files
@ 2016-10-04  1:59 Stephano Cetola
  2016-10-04  1:59 ` Stephano Cetola
  0 siblings, 1 reply; 2+ messages in thread
From: Stephano Cetola @ 2016-10-04  1:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: paul.eggleton

Changes since V2:
Added os.sep to path name for decreased chance of false positive matches.

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

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

-- 
2.10.0



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH V3] devtool: modify command fails to ignore source files
  2016-10-04  1:59 [PATCH V3] devtool: modify command fails to ignore source files Stephano Cetola
@ 2016-10-04  1:59 ` Stephano Cetola
  0 siblings, 0 replies; 2+ messages in thread
From: Stephano Cetola @ 2016-10-04  1:59 UTC (permalink / raw)
  To: openembedded-core; +Cc: paul.eggleton

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>
---
 scripts/lib/devtool/standard.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 8319145..48b0a5e 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -568,8 +568,13 @@ 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
+                       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),
-- 
2.10.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-04  2:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-04  1:59 [PATCH V3] devtool: modify command fails to ignore source files Stephano Cetola
2016-10-04  1:59 ` Stephano Cetola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox