From 322d5cc014245f9232875c75811075591d56cf91 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Fri, 20 Aug 2010 16:08:37 -0700 Subject: Short cut the failure on repeated builds Saves a bunch of time waiting for the srpm creation and koji to figure out what n-v-r we're trying to build. Ticket #27 --- src/pyfedpkg/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index cdccd7f..b34481d 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -1034,6 +1034,14 @@ class PackageModule: priority = 5 # magic koji number :/ cmd.append(self.target) + # see if this build has been done. Does not check builds within + # a chain + if not scratch: + build = self.kojisession.getBuild(self.nvr) + if build: + if build['state'] == 1: + raise FedpkgError('%s has already been built' % + self.nvr) # Now submit the task and get the task_id to return # Handle the chain build version if chain: -- cgit