extras-buildsys/builder BuilderMock.py,1.13,1.14

Michael Schwendt (mschwendt) fedora-extras-commits at redhat.com
Tue Nov 13 13:42:53 UTC 2007


Author: mschwendt

Update of /cvs/fedora/extras-buildsys/builder
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32433/d

Modified Files:
	BuilderMock.py 
Log Message:
Commit the mock builder race cond.fix which is running in FE buildsys since Sep.


Index: BuilderMock.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/builder/BuilderMock.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- BuilderMock.py	29 Jul 2006 05:28:27 -0000	1.13
+++ BuilderMock.py	13 Nov 2007 13:42:51 -0000	1.14
@@ -369,6 +369,12 @@
             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')
@@ -387,8 +393,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')




More information about the fedora-extras-commits mailing list