summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pyfedpkg/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py
index 0e78f53..faa1b86 100644
--- a/src/pyfedpkg/__init__.py
+++ b/src/pyfedpkg/__init__.py
@@ -1292,8 +1292,11 @@ class PackageModule:
srpm = os.path.join(self.path,
"%s-%s-%s.src.rpm" % (self.module,
self.ver, self.rel))
+ # See if we need to build the srpm
if not os.path.exists(srpm):
- raise FedpkgError('Need to build srpm first')
+ # This should figure out the hashtype to use
+ log.debug('No srpm found, building one.')
+ self.srpm()
# setup the command
cmd = ['mock']