summaryrefslogtreecommitdiff
path: root/bitbake-dev
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-07-23 19:31:23 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2009-07-23 19:31:23 +0100
commit60ba2a6a0884f76d1baa02cbf7eda5ce1ef3ab1c (patch)
treec911adc79304a811ab863523d165bef4d638a188 /bitbake-dev
parent4ef85553f492995d426980453ef962da208342d9 (diff)
downloadopenembedded-core-60ba2a6a0884f76d1baa02cbf7eda5ce1ef3ab1c.tar.gz
openembedded-core-60ba2a6a0884f76d1baa02cbf7eda5ce1ef3ab1c.tar.bz2
openembedded-core-60ba2a6a0884f76d1baa02cbf7eda5ce1ef3ab1c.zip
bitbake-dev: Fix cooker parser for cases there are no recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake-dev')
-rw-r--r--bitbake-dev/lib/bb/cooker.py61
1 files changed, 31 insertions, 30 deletions
diff --git a/bitbake-dev/lib/bb/cooker.py b/bitbake-dev/lib/bb/cooker.py
index c4d65ddad5..3c232a6ac7 100644
--- a/bitbake-dev/lib/bb/cooker.py
+++ b/bitbake-dev/lib/bb/cooker.py
@@ -906,7 +906,6 @@ class CookerExit(bb.event.Event):
def __init__(self, d):
bb.event.Event.__init__(self, d)
-
class CookerParser:
def __init__(self, cooker, filelist, masked):
# Internal data
@@ -926,38 +925,40 @@ class CookerParser:
def parse_next(self):
print "Pointer %d" % self.pointer
- f = self.filelist[self.pointer]
- cooker = self.cooker
- try:
- fromCache, skip = cooker.bb_cache.loadData(f, cooker.configuration.data, cooker.status)
- if skip:
- self.skipped += 1
- bb.msg.debug(2, bb.msg.domain.Collection, "skipping %s" % f)
- cooker.bb_cache.skip(f)
- elif fromCache: self.cached += 1
- else: self.parsed += 1
+ if self.pointer < len(self.filelist):
+ f = self.filelist[self.pointer]
+ cooker = self.cooker
- except IOError, e:
- self.error += 1
- cooker.bb_cache.remove(f)
- bb.msg.error(bb.msg.domain.Collection, "opening %s: %s" % (f, e))
- pass
- except KeyboardInterrupt:
- cooker.bb_cache.remove(f)
- cooker.bb_cache.sync()
- raise
- except Exception, e:
- self.error += 1
- cooker.bb_cache.remove(f)
- bb.msg.error(bb.msg.domain.Collection, "%s while parsing %s" % (e, f))
- except:
- cooker.bb_cache.remove(f)
- raise
- finally:
- bb.event.fire(bb.event.ParseProgress(cooker.configuration.event_data, self.cached, self.parsed, self.skipped, self.masked, self.error, self.total))
+ try:
+ fromCache, skip = cooker.bb_cache.loadData(f, cooker.configuration.data, cooker.status)
+ if skip:
+ self.skipped += 1
+ bb.msg.debug(2, bb.msg.domain.Collection, "skipping %s" % f)
+ cooker.bb_cache.skip(f)
+ elif fromCache: self.cached += 1
+ else: self.parsed += 1
+
+ except IOError, e:
+ self.error += 1
+ cooker.bb_cache.remove(f)
+ bb.msg.error(bb.msg.domain.Collection, "opening %s: %s" % (f, e))
+ pass
+ except KeyboardInterrupt:
+ cooker.bb_cache.remove(f)
+ cooker.bb_cache.sync()
+ raise
+ except Exception, e:
+ self.error += 1
+ cooker.bb_cache.remove(f)
+ bb.msg.error(bb.msg.domain.Collection, "%s while parsing %s" % (e, f))
+ except:
+ cooker.bb_cache.remove(f)
+ raise
+ finally:
+ bb.event.fire(bb.event.ParseProgress(cooker.configuration.event_data, self.cached, self.parsed, self.skipped, self.masked, self.error, self.total))
- self.pointer += 1
+ self.pointer += 1
if self.pointer >= self.total:
cooker.bb_cache.sync()