From 2ac45a783dec9ba453b567b8aefdfe0f5f65f055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 21 Sep 2016 13:48:51 +0200 Subject: [PATCH] ostree_installer: Add --isfinal lorax argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the compose is supported, we need to tell lorax to use the option. Fixes: #399 Signed-off-by: Lubomír Sedlář --- pungi/phases/ostree_installer.py | 3 ++- tests/test_ostree_installer_phase.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pungi/phases/ostree_installer.py b/pungi/phases/ostree_installer.py index 78acb723..5b45f75a 100644 --- a/pungi/phases/ostree_installer.py +++ b/pungi/phases/ostree_installer.py @@ -149,7 +149,8 @@ class OstreeInstallerThread(WorkerThread): add_template=self._get_templates(config, 'add_template'), add_arch_template=self._get_templates(config, 'add_arch_template'), add_template_var=config.get('add_template_var'), - add_arch_template_var=config.get('add_arch_template_var') + add_arch_template_var=config.get('add_arch_template_var'), + is_final=compose.supported, ) runroot_channel = compose.conf.get("runroot_channel") diff --git a/tests/test_ostree_installer_phase.py b/tests/test_ostree_installer_phase.py index cf4fc68c..06339df5 100644 --- a/tests/test_ostree_installer_phase.py +++ b/tests/test_ostree_installer_phase.py @@ -75,6 +75,7 @@ class OstreeThreadTest(helpers.PungiTestCase): 'koji_profile': 'koji', 'runroot_tag': 'rrt', }) + compose.supported = False pool = mock.Mock() cfg = { 'source_repo_from': 'Everything', @@ -166,6 +167,7 @@ class OstreeThreadTest(helpers.PungiTestCase): '--source=http://example.com/repo/x86_64/', '--variant=Everything', '--nomacboot', + '--isfinal', self.topdir + '/work/x86_64/Everything/ostree_installer'], channel=None, mounts=[self.topdir], packages=['pungi', 'lorax', 'ostree'], @@ -278,6 +280,7 @@ class OstreeThreadTest(helpers.PungiTestCase): '--source=file://%s/compose/Everything/x86_64/os' % self.topdir, '--variant=Everything', '--nomacboot', + '--isfinal', '--add-template=%s/some_file.txt' % templ_dir, '--add-arch-template=%s/other_file.txt' % templ_dir, self.topdir + '/work/x86_64/Everything/ostree_installer'], @@ -355,6 +358,7 @@ class OstreeThreadTest(helpers.PungiTestCase): '--source=file://%s/compose/Everything/x86_64/os' % self.topdir, '--variant=Everything', '--nomacboot', + '--isfinal', '--installpkgs=fedora-productimg-atomic', '--add-template=/spin-kickstarts/atomic-installer/lorax-configure-repo.tmpl', '--add-arch-template=/spin-kickstarts/atomic-installer/lorax-embed-repo.tmpl',