*** a/buildbot/steps/source/mtn.py.orig 2015-04-16 22:27:34.336585869 +0200 --- b/buildbot/steps/source/mtn.py 2015-04-17 14:33:35.539813501 +0200 *************** *** 319,325 **** return d def _checkDb(self): ! d = self._dovccmd(['mtn', 'db', 'info', '--db', self.database], collectStdout=True) def checkInfo(stdout): if stdout.find("does not exist") > 0: --- 319,327 ---- return d def _checkDb(self): ! d = self._dovccmd(['mtn', 'db', 'info', '--db', self.database], ! collectStdout=True, ! abandonOnFailure=False) def checkInfo(stdout): if stdout.find("does not exist") > 0: *************** *** 337,352 **** d.addCallback(checkInfo) return d def _sourcedirIsUpdatable(self): ! d = self.pathExists(self.build.path_module.join(self.workdir, '_MTN')) ! def cont(res): ! if res: ! d.addCallback(lambda _: self.pathExists('db.mtn')) ! else: ! return False ! d.addCallback(cont) ! return d def finish(self, res): d = defer.succeed(res) --- 339,358 ---- d.addCallback(checkInfo) return d + @defer.inlineCallbacks def _sourcedirIsUpdatable(self): ! workdir_path = self.build.path_module.join(self.workdir, '_MTN') ! workdir_exists = yield self.pathExists(workdir_path) ! db_path = self.build.path_module.join(self.workdir, self.database) ! db_exists = yield self.pathExists(db_path) ! ! if not db_exists: ! log.msg("Database does not exist, fallback to a fresh clone") ! if not workdir_exists: ! log.msg("Workdir does not exist, fallback to a fresh clone") ! ! defer.returnValue(db_exists and workdir_exists) def finish(self, res): d = defer.succeed(res)