From 6c15779a91007c5a8e1380a2c82391d49b9eda3a Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 11 Aug 2010 20:40:58 -0700 Subject: Make an srpm if we need one. Ticket #49 --- src/pyfedpkg/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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'] -- cgit