summaryrefslogtreecommitdiffstats
path: root/src/pyfedpkg
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 /src/pyfedpkg
parent6537a641a9deb430073a15d04a0d49bc3f812408 (diff)
downloadfedora-packager-322d5cc014245f9232875c75811075591d56cf91.tar.gz
fedora-packager-322d5cc014245f9232875c75811075591d56cf91.tar.xz
fedora-packager-322d5cc014245f9232875c75811075591d56cf91.zip
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
Diffstat (limited to 'src/pyfedpkg')
-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: