summaryrefslogtreecommitdiffstats
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)
downloadpoky-60ba2a6a0884f76d1baa02cbf7eda5ce1ef3ab1c.tar.gz
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):
906 def __init__(self, d): 906 def __init__(self, d):
907 bb.event.Event.__init__(self, d) 907 bb.event.Event.__init__(self, d)
908 908
909
910class CookerParser: 909class CookerParser:
911 def __init__(self, cooker, filelist, masked): 910 def __init__(self, cooker, filelist, masked):
912 # Internal data 911 # Internal data
@@ -926,38 +925,40 @@ class CookerParser:
926 925
927 def parse_next(self): 926 def parse_next(self):
928 print "Pointer %d" % self.pointer 927 print "Pointer %d" % self.pointer
929 f = self.filelist[self.pointer]
930 cooker = self.cooker
931 928
932 try: 929 if self.pointer < len(self.filelist):
933 fromCache, skip = cooker.bb_cache.loadData(f, cooker.configuration.data, cooker.status) 930 f = self.filelist[self.pointer]
934 if skip: 931 cooker = self.cooker
935 self.skipped += 1
936 bb.msg.debug(2, bb.msg.domain.Collection, "skipping %s" % f)
937 cooker.bb_cache.skip(f)
938 elif fromCache: self.cached += 1
939 else: self.parsed += 1
940 932
941 except IOError, e: 933 try:
942 self.error += 1 934 fromCache, skip = cooker.bb_cache.loadData(f, cooker.configuration.data, cooker.status)
943 cooker.bb_cache.remove(f) 935 if skip:
944 bb.msg.error(bb.msg.domain.Collection, "opening %s: %s" % (f, e)) 936 self.skipped += 1
945 pass 937 bb.msg.debug(2, bb.msg.domain.Collection, "skipping %s" % f)
946 except KeyboardInterrupt: 938 cooker.bb_cache.skip(f)
947 cooker.bb_cache.remove(f) 939 elif fromCache: self.cached += 1
948 cooker.bb_cache.sync() 940 else: self.parsed += 1
949 raise 941
950 except Exception, e: 942 except IOError, e:
951 self.error += 1 943 self.error += 1
952 cooker.bb_cache.remove(f) 944 cooker.bb_cache.remove(f)
953 bb.msg.error(bb.msg.domain.Collection, "%s while parsing %s" % (e, f)) 945 bb.msg.error(bb.msg.domain.Collection, "opening %s: %s" % (f, e))
954 except: 946 pass
955 cooker.bb_cache.remove(f) 947 except KeyboardInterrupt:
956 raise 948 cooker.bb_cache.remove(f)
957 finally: 949 cooker.bb_cache.sync()
958 bb.event.fire(bb.event.ParseProgress(cooker.configuration.event_data, self.cached, self.parsed, self.skipped, self.masked, self.error, self.total)) 950 raise
951 except Exception, e:
952 self.error += 1
953 cooker.bb_cache.remove(f)
954 bb.msg.error(bb.msg.domain.Collection, "%s while parsing %s" % (e, f))
955 except:
956 cooker.bb_cache.remove(f)
957 raise
958 finally:
959 bb.event.fire(bb.event.ParseProgress(cooker.configuration.event_data, self.cached, self.parsed, self.skipped, self.masked, self.error, self.total))
959 960
960 self.pointer += 1 961 self.pointer += 1
961 962
962 if self.pointer >= self.total: 963 if self.pointer >= self.total:
963 cooker.bb_cache.sync() 964 cooker.bb_cache.sync()