diff --git a/tests/buildpackage.py b/tests/buildpackage.py
index <HASH>..<HASH> 100644
--- a/tests/buildpackage.py
+++ b/tests/buildpackage.py
@@ -233,6 +233,8 @@ def build_centos(opts):
     if major_release == 5:
         python_bin = 'python26'
         define_opts.extend(['--define', 'dist .el5'])
+        if os.path.exists('/etc/yum.repos.d/saltstack.repo'):
+            build_reqs.extend(['--enablerepo=saltstack'])
         build_reqs.extend(['python26-devel'])
     elif major_release == 6:
         build_reqs.extend(['python-devel'])
Use saltstack repo in buildpackage.py on CentOS 5 (#<I>)