* [PATCH 0/1] Bug fixes for the hob v2
@ 2011-07-13 16:06 Joshua Lock
2011-07-13 16:06 ` [PATCH 1/1] cooker: only return *Found events if something was actually found Joshua Lock
0 siblings, 1 reply; 3+ messages in thread
From: Joshua Lock @ 2011-07-13 16:06 UTC (permalink / raw)
To: bitbake-devel
Updated version of the final patch in the series to address Richard's code
review.
The following changes since commit 4803c6d3d1db31105d98a7f71596875333db0dc5:
ui/crumbs/tasklistmodel: fix automatic removal of orphaned items (2011-07-13 12:28:15 +0100)
are available in the git repository at:
git://github.com/incandescant/bitbake hob
https://github.com/incandescant/bitbake/tree/hob
Joshua Lock (1):
cooker: only return *Found events if something was actually found
lib/bb/cooker.py | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
--
1.7.6
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] cooker: only return *Found events if something was actually found
2011-07-13 16:06 [PATCH 0/1] Bug fixes for the hob v2 Joshua Lock
@ 2011-07-13 16:06 ` Joshua Lock
2011-07-14 14:13 ` Richard Purdie
0 siblings, 1 reply; 3+ messages in thread
From: Joshua Lock @ 2011-07-13 16:06 UTC (permalink / raw)
To: bitbake-devel
The cooker methods which fire FooBarFound style events should only fire the
event when an item was actually found, rather than each time the method
is called.
Fixes [YOCTO #1219]
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
lib/bb/cooker.py | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 7aa600f..23f2c76 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -546,14 +546,15 @@ class BBCooker:
def findConfigFilePath(self, configfile):
path = self._findConfigFile(configfile)
- bb.event.fire(bb.event.ConfigFilePathFound(path), self.configuration.data)
+ if path:
+ bb.event.fire(bb.event.ConfigFilePathFound(path), self.configuration.data)
def findFilesMatchingInDir(self, filepattern, directory):
"""
Searches for files matching the regex 'pattern' which are children of
'directory' in each BBPATH. i.e. to find all rootfs package classes available
to BitBake one could call findFilesMatchingInDir(self, 'rootfs_', 'classes')
- or to find all machine configuration files on could call
+ or to find all machine configuration files one could call:
findFilesMatchingInDir(self, 'conf/machines', 'conf')
"""
import re
@@ -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 matches:
+ bb.event.fire(bb.event.FilesMatchingFound(filepattern, matches), self.configuration.data)
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 possible:
+ bb.event.fire(bb.event.ConfigFilesFound(var, possible), self.configuration.data)
def findInheritsClass(self, klass):
"""
@@ -667,6 +670,7 @@ class BBCooker:
return confpath
path, _ = os.path.split(path)
+ return None
def _findLayerConf(self):
return self._findConfigFile("bblayers.conf")
--
1.7.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] cooker: only return *Found events if something was actually found
2011-07-13 16:06 ` [PATCH 1/1] cooker: only return *Found events if something was actually found Joshua Lock
@ 2011-07-14 14:13 ` Richard Purdie
0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2011-07-14 14:13 UTC (permalink / raw)
To: Joshua Lock; +Cc: bitbake-devel
On Wed, 2011-07-13 at 09:06 -0700, Joshua Lock wrote:
> The cooker methods which fire FooBarFound style events should only fire the
> event when an item was actually found, rather than each time the method
> is called.
>
> Fixes [YOCTO #1219]
>
> Signed-off-by: Joshua Lock <josh@linux.intel.com>
> ---
> lib/bb/cooker.py | 12 ++++++++----
> 1 files changed, 8 insertions(+), 4 deletions(-)
Merged to master, thanks.
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-07-14 14:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-13 16:06 [PATCH 0/1] Bug fixes for the hob v2 Joshua Lock
2011-07-13 16:06 ` [PATCH 1/1] cooker: only return *Found events if something was actually found Joshua Lock
2011-07-14 14:13 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.