[bitbake-devel] [PATCH 3/3] cooker: only return *Found events if something was actually found

Richard Purdie richard.purdie at linuxfoundation.org
Wed Jul 13 11:27:17 UTC 2011


On Tue, 2011-07-12 at 14:49 -0700, Joshua Lock wrote:
> @@ -569,7 +570,8 @@ class BBCooker:
>                          if p.search(f):
>                              matches.append(f)
>  
> -        bb.event.fire(bb.event.FilesMatchingFound(filepattern, matches), self.configuration.data)
> +        if len(matches):
> +            bb.event.fire(bb.event.FilesMatchingFound(filepattern, matches), self.configuration.data)

I think this can just be "if matches:"

>      def findConfigFiles(self, varname):
>          """
> @@ -592,7 +594,8 @@ class BBCooker:
>                          if end == 'conf':
>                              possible.append(val)
>  
> -        bb.event.fire(bb.event.ConfigFilesFound(var, possible), self.configuration.data)
> +        if len(possible):
> +            bb.event.fire(bb.event.ConfigFilesFound(var, possible), self.configuration.data)
>  
>      def findInheritsClass(self, klass):
>          """

ditto.

Cheers,

Richard





More information about the bitbake-devel mailing list