diff -Nur plague-0.4.4.1-orig/builder/builder.py plague-0.4.4.1/builder/builder.py --- plague-0.4.4.1-orig/builder/builder.py 2006-03-13 16:09:23.000000000 +0100 +++ plague-0.4.4.1/builder/builder.py 2007-09-19 02:53:00.000000000 +0200 @@ -370,11 +370,17 @@ self._start_cleanup() def _status_prepping(self): + # Refresh mock status to see whether it changed during sleep. + # Avoid mock/plague race condition. + if not self._mock_is_prepping(): + if not self._mock_using_repo(): # status changed during sleep + self._status = 'building' + return # Mock shouldn't exit at all during the prepping stage, if it does # something is wrong self._watch_mock('failed', 'failed') if self._status != 'prepping': - return + return # We need to make sure that mock has dumped the status file withing a certain # amount of time, otherwise we can't tell what it's doing @@ -388,8 +394,6 @@ else: if not self._mock_config and self._mock_is_prepping(): self._mock_config = self._read_mock_config() - if not self._mock_using_repo(): - self._status = 'building' def _status_building(self): self._watch_mock('done', 'failed')