summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-08-20 16:08:37 -0700
committerJesse Keating <jkeating@redhat.com>2010-08-20 16:08:37 -0700
commit322d5cc014245f9232875c75811075591d56cf91 (patch)
treeb206a891462a38bc9a1087d3b82891e15899ffb1
parent6537a641a9deb430073a15d04a0d49bc3f812408 (diff)
downloadfedora-packager-322d5cc014245f9232875c75811075591d56cf91.zip
fedora-packager-322d5cc014245f9232875c75811075591d56cf91.tar.gz
fedora-packager-322d5cc014245f9232875c75811075591d56cf91.tar.xz
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
-rw-r--r--src/pyfedpkg/__init__.py8
1 files changed, 8 insertions, 0 deletions
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: