[createiso] Add customizing disc type

Relates: #105
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-03-08 13:02:15 +01:00
parent 44d7b31a80
commit 72f9819779
2 changed files with 5 additions and 3 deletions

View File

@ -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',
}

View File

@ -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,