From 34881df79255bde0b59a913dd8f4d4ac097dbd49 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Apr 19 2024 02:02:45 +0000 Subject: refuse image tasks when required deps are missing --- diff --git a/builder/kojid b/builder/kojid index 3565dc6..3a18605 100755 --- a/builder/kojid +++ b/builder/kojid @@ -2734,7 +2734,7 @@ class BuildBaseImageTask(BuildImageTask): self.logger.error( "ImageFactory features require the following dependencies: pykickstart, " "imagefactory, oz and possibly python-hashlib") - raise koji.ApplianceError('ImageFactory functions not available') + raise RefuseTask('ImageFactory functions not available') # Policy check task_info = self.session.getTaskInfo(self.id) @@ -2893,7 +2893,7 @@ class BuildApplianceTask(BuildImageTask): self.logger.error( "Appliance features require the following dependencies: " "pykickstart, and possibly python-hashlib") - raise koji.ApplianceError('Appliance functions not available') + raise RefuseTask('Appliance functions not available') # build image bld_info = None @@ -2980,7 +2980,7 @@ class BuildLiveCDTask(BuildImageTask): if not image_enabled: self.logger.error("LiveCD features require the following dependencies: " "pykickstart, pycdio, and possibly python-hashlib") - raise koji.LiveCDError('LiveCD functions not available') + raise RefuseTask('LiveCD functions not available') # build the image bld_info = None @@ -3075,7 +3075,7 @@ class BuildLiveMediaTask(BuildImageTask): # XXX - are these still required here? self.logger.error("Missing the following dependencies: " "pykickstart, pycdio, and possibly python-hashlib") - raise koji.PreBuildError('Live Media functions not available') + raise RefuseTask('Live Media functions not available') # build the image bld_info = None @@ -4676,7 +4676,7 @@ class BaseImageTask(OzImageTask): self.logger.error( "ImageFactory features require the following dependencies: " "pykickstart, imagefactory, oz and possibly python-hashlib") - raise koji.ApplianceError('ImageFactory functions not available') + raise RefuseTask('ImageFactory functions not available') if opts is None: opts = {}