1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

recipetool: ignore incidental kernel module source

If the source tree happens to contain a kernel module as an example, a
test or under a "contrib" directory then we shouldn't be picking it up
and making the determination that the entire thing is a kernel module.

An example that triggered this is zstd, which ships a kernel module
under contrib/linux-kernel:

  https://github.com/facebook/zstd

(From OE-Core rev: c2b3154158d4bb0855daa56477393341139d4cf9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Eggleton
2017-09-20 16:43:33 +12:00
committed by Richard Purdie
parent 05d1e69956
commit e9bb56067a
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -156,10 +156,12 @@ class RecipeHandler(object):
RecipeHandler.recipebinmap[prog] = pn
@staticmethod
def checkfiles(path, speclist, recursive=False):
def checkfiles(path, speclist, recursive=False, excludedirs=None):
results = []
if recursive:
for root, _, files in os.walk(path):
for root, dirs, files in os.walk(path, topdown=True):
if excludedirs:
dirs[:] = [d for d in dirs if d not in excludedirs]
for fn in files:
for spec in speclist:
if fnmatch.fnmatch(fn, spec):