From 084994538bae1781e66ea0cfa1fb4a74945b4b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Thu, 14 Apr 2016 14:23:42 +0200 Subject: [PATCH] Add common global settings for images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The live_images, live_media and image_build phases have same options that need to be specified on each image. This leads to a lot of duplication in the config file. This patch adds global settings and phase-level settings that allow to significantly reduce duplication. Signed-off-by: Lubomír Sedlář --- doc/configuration.rst | 41 ++++++++++++ pungi/phases/base.py | 65 ++++++++++++++++++++ pungi/phases/image_build.py | 46 ++++++++++++-- pungi/phases/init.py | 21 +++++++ pungi/phases/live_images.py | 40 +++++++----- pungi/phases/livemedia_phase.py | 41 +++--------- tests/test_imagebuildphase.py | 61 +++++++++++++++++- tests/test_liveimagesphase.py | 106 +++++++++++++++++++++++++++++++- tests/test_livemediaphase.py | 102 +++++++++++++++++++++++++++++- tests/test_phase_base.py | 73 ++++++++++++++++++++++ 10 files changed, 534 insertions(+), 62 deletions(-) create mode 100644 tests/test_phase_base.py diff --git a/doc/configuration.rst b/doc/configuration.rst index 2d7e324e..bd628985 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -735,6 +735,47 @@ Example ] +Common options for Live Images, Live Media and Image Build +========================================================== + +All images can have ``ksurl``, ``version``, ``release`` and ``target`` +specified. Since this can create a lot of duplication, there are global options +that can be used instead. + +For each of the phases, if the option is not specified for a particular +deliverable, an option named ``_