#21 createiso: Add createiso_skip options to skip createiso on any variant/arch.
Merged 3 years ago by ausil. Opened 3 years ago by dmach.
dmach/pungi createiso-fix  into  master

file modified
+27

@@ -436,3 +436,30 @@ 

          "branch": None,

          "dir": "po",

      }

+ 

+ 

+ CreateISO Settings

+ ==================

+ 

+ Options

+ -------

+ 

+ **createiso_skip** = False

+     (*list*) -- mapping that defines which variants and arches to skip during createiso; format: [(variant_uid_regex, {arch|*: True})]

+ 

+ .. note::

+ 

+     Source architecture needs to be listed explicitly.

+     Excluding '*' applies only on binary arches.

+ 

+ 

+ Example

+ -------

+ ::

+ 

+     createiso_skip = [

+         ('^Workstation$', {

+             '*': True,

+             'src': True

+         }),

+     ]

file modified
+14 -1

@@ -32,7 +32,7 @@ 

  from pungi.wrappers.kojiwrapper import KojiWrapper

  from pungi.wrappers.jigdo import JigdoWrapper

  from pungi.phases.base import PhaseBase

- from pungi.util import makedirs, get_volid

+ from pungi.util import makedirs, get_volid, get_arch_variant_data

  from pungi.media_split import MediaSplitter

  from pungi.compose_metadata.discinfo import read_discinfo, write_discinfo

  

@@ -40,6 +40,14 @@ 

  class CreateisoPhase(PhaseBase):

      name = "createiso"

  

+     config_options = (

+         {

+             "name": "createiso_skip",

+             "expected_types": [list],

+             "optional": True,

+         },

+     )

+ 

      def __init__(self, compose):

          PhaseBase.__init__(self, compose)

          self.pool = ThreadPool(logger=self.compose._logger)

@@ -51,6 +59,11 @@ 

          commands = []

          for variant in self.compose.get_variants(types=["variant", "layered-product", "optional"], recursive=True):

              for arch in variant.arches + ["src"]:

+                 skip_iso = get_arch_variant_data(self.compose.conf, "createiso_skip", arch, variant)

+                 if skip_iso == [True]:

+                     self.compose.log_info("Skipping createiso for %s.%s due to config option" % (variant, arch))

+                     continue

+ 

                  volid = get_volid(self.compose, arch, variant)

                  os_tree = self.compose.paths.compose.os_tree(arch, variant)

  

@@ -96,3 +96,12 @@ 

  

  # BUILDINSTALL

  bootable = False

+ 

+ 

+ # CREATEISO

+ createiso_skip = [

+     ('^Server-Gluster$', {

+         '*': True,

+         'src': True

+     }),

+ ]