[CentOS-devel] [PATCH 3/4] Redefine the "target" used for mock and koji builds.

Sat Jul 5 04:48:59 UTC 2014
Brian Stinson <bstinson at ksu.edu>

This redefinition temporarily uses the epel mock configs since they are
the only EL configs that are readily distributed. This is where we can
make changes later.
---
 src/centpkg/__init__.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/centpkg/__init__.py b/src/centpkg/__init__.py
index e6f4e45..37dbe83 100644
--- a/src/centpkg/__init__.py
+++ b/src/centpkg/__init__.py
@@ -72,6 +72,13 @@ class Commands(pyrpkg.Commands):
 
         raise pyrpkg.rpkgError('No spec file found.')
 
+    def load_target(self):
+        """ This sets the target attribute (used for mock and koji) """
+        # This is a hack, eventually we will want to use non-epel mock configs
+        # We use the epel configs for now because they are the only distributed
+        # mock configs that build against EL mock trees
+        self._target = 'epel-{0}'.format(self.distval)
+
     # These are the commands defined in the base pyrpkg.Commands class
     # and have been implemented here
 
-- 
1.7.1