From 72f98197791a04790b7d639e726cddb6eb689f76 Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: Mar 08 2016 12:04:34 +0000 Subject: [createiso] Add customizing disc type Relates: #105 Signed-off-by: Lubomír Sedlář --- diff --git a/doc/configuration.rst b/doc/configuration.rst index 4c68476..9b36856 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -245,6 +245,7 @@ There a couple common format specifiers available for both the options: Available keys are: * ``boot`` -- for ``boot.iso`` images created in *buildinstall* phase * ``live`` -- for images created by *live_images* phase + * ``dvd`` -- for images created by *createiso* phase Default values are the same as the keys. @@ -271,6 +272,7 @@ Example disc_types = { 'boot': 'netinst', 'live': 'Live', + 'dvd': 'DVD', } diff --git a/pungi/phases/createiso.py b/pungi/phases/createiso.py index bf582f9..ec41221 100644 --- a/pungi/phases/createiso.py +++ b/pungi/phases/createiso.py @@ -54,6 +54,7 @@ class CreateisoPhase(PhaseBase): def run(self): iso = IsoWrapper(logger=self.compose._logger) symlink_isos_to = self.compose.conf.get("symlink_isos_to", None) + disc_type = self.compose.conf.get('disc_types', {}).get('dvd', 'dvd') deliverables = [] commands = [] @@ -64,7 +65,7 @@ class CreateisoPhase(PhaseBase): self.compose.log_info("Skipping createiso for %s.%s due to config option" % (variant, arch)) continue - volid = get_volid(self.compose, arch, variant, disc_type='dvd') + volid = get_volid(self.compose, arch, variant, disc_type=disc_type) os_tree = self.compose.paths.compose.os_tree(arch, variant) iso_dir = self.compose.paths.compose.iso_dir(arch, variant, symlink_to=symlink_isos_to) @@ -90,9 +91,8 @@ class CreateisoPhase(PhaseBase): for disc_num, iso_data in enumerate(split_iso_data): disc_num += 1 - # XXX: hardcoded disc_type filename = self.compose.get_image_name(arch, variant, - disc_type="dvd", + disc_type=disc_type, disc_num=disc_num) iso_path = self.compose.paths.compose.iso_path(arch, variant,