From 1972740141208fe05af5c58203286bad93936706 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Thu, 6 Jul 2023 16:12:16 -0700 Subject: [PATCH] hotfix: raise exception if rpmbuild is not available --- README.md | 3 ++- pv2/importer/operation.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2e79f40..9e8f930 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ in the RESF (such as Rocky Linux). * CentOS Stream 8, 9+ recommended * Python 3.6 or higher - Python 3.9+ recommended +* rpm-build * A few python modules * file-magic (python3-file-magic) @@ -22,7 +23,7 @@ in the RESF (such as Rocky Linux). * rpm (python3-rpm) * pycurl (python3-pycurl) -* rpm macros packages +* rpm macros packages (brought in by rpm-build package) * \*-rpm-macros * \*-srpm-macros diff --git a/pv2/importer/operation.py b/pv2/importer/operation.py index 33beec5..9231840 100644 --- a/pv2/importer/operation.py +++ b/pv2/importer/operation.py @@ -58,6 +58,9 @@ class Import: """ Packs an srpm from available sources """ + if not os.path.exists('/usr/bin/rpmbuild'): + raise err.FileNotFound('rpmbuild command is missing') + command_to_send = [ 'rpmbuild', '-bs',