diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-11 14:13:05 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-12 15:52:33 +0000 |
commit | c003a308607d8d96b22cff72f77812b6c324302d (patch) | |
tree | 104e0ce902d2d4868a2e6676cac5b2c911a185b9 /bitbake | |
parent | fe0659991b826eb3b4163743d29533fe5f91cb12 (diff) | |
download | poky-c003a308607d8d96b22cff72f77812b6c324302d.tar.gz |
cooker.py: Allow parsing shutdown to be called more than once
The parsing shutdown call can occur more than once. Currently
if this happens the code will hang. Add some code to prevent this.
[YOCTO #2039 partial]
(Bitbake rev: 7614c5bdcaf9d70614b4fad2ca02c7e6eaa92f1b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index a9d86836ec..f97e6012c7 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -1556,6 +1556,7 @@ class CookerParser(object): | |||
1556 | self.progress_chunk = max(self.toparse / 100, 1) | 1556 | self.progress_chunk = max(self.toparse / 100, 1) |
1557 | 1557 | ||
1558 | self.start() | 1558 | self.start() |
1559 | self.haveshutdown = False | ||
1559 | 1560 | ||
1560 | def start(self): | 1561 | def start(self): |
1561 | self.results = self.load_cached() | 1562 | self.results = self.load_cached() |
@@ -1582,6 +1583,9 @@ class CookerParser(object): | |||
1582 | def shutdown(self, clean=True, force=False): | 1583 | def shutdown(self, clean=True, force=False): |
1583 | if not self.toparse: | 1584 | if not self.toparse: |
1584 | return | 1585 | return |
1586 | if self.haveshutdown: | ||
1587 | return | ||
1588 | self.haveshutdown = True | ||
1585 | 1589 | ||
1586 | if clean: | 1590 | if clean: |
1587 | event = bb.event.ParseCompleted(self.cached, self.parsed, | 1591 | event = bb.event.ParseCompleted(self.cached, self.parsed, |