hotfix: raise exception if rpmbuild is not available

This commit is contained in:
Louis Abel 2023-07-06 16:12:16 -07:00
parent 3488f7ca28
commit 1972740141
Signed by: label
GPG Key ID: 3331F061D1D9990E
2 changed files with 5 additions and 1 deletions

View File

@ -14,6 +14,7 @@ in the RESF (such as Rocky Linux).
* CentOS Stream 8, 9+ recommended * CentOS Stream 8, 9+ recommended
* Python 3.6 or higher - Python 3.9+ recommended * Python 3.6 or higher - Python 3.9+ recommended
* rpm-build
* A few python modules * A few python modules
* file-magic (python3-file-magic) * file-magic (python3-file-magic)
@ -22,7 +23,7 @@ in the RESF (such as Rocky Linux).
* rpm (python3-rpm) * rpm (python3-rpm)
* pycurl (python3-pycurl) * pycurl (python3-pycurl)
* rpm macros packages * rpm macros packages (brought in by rpm-build package)
* \*-rpm-macros * \*-rpm-macros
* \*-srpm-macros * \*-srpm-macros

View File

@ -58,6 +58,9 @@ class Import:
""" """
Packs an srpm from available sources Packs an srpm from available sources
""" """
if not os.path.exists('/usr/bin/rpmbuild'):
raise err.FileNotFound('rpmbuild command is missing')
command_to_send = [ command_to_send = [
'rpmbuild', 'rpmbuild',
'-bs', '-bs',