diff --git a/doc/configuration.rst b/doc/configuration.rst index 03c21da5..2d7e324e 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -994,9 +994,6 @@ an OSTree repository. This always runs in Koji as a ``runroot`` task. * ``release`` -- (*str*) Release value to set for the installer image. Set to ``None`` to use the date.respin format. - * ``filename`` -- (*str*) What to name the installer iso. This is a - template with options listed in Image naming section. If not specified, - global naming format will be used. These optional keys are passed to ``lorax`` to customize the build. @@ -1023,7 +1020,6 @@ Example config "x86_64": { "source_repo_from": "Everything", "release": None, - "filename": "%(release_short)s-%(variant)s-%(arch)s-%(version)s-%(date)s.iso", "installpkgs": ["fedora-productimg-atomic"], "add_template": ["atomic-installer/lorax-configure-repo.tmpl"], "add_template_var": [ diff --git a/pungi/phases/ostree_installer.py b/pungi/phases/ostree_installer.py index ad962174..95cf9c19 100644 --- a/pungi/phases/ostree_installer.py +++ b/pungi/phases/ostree_installer.py @@ -62,8 +62,7 @@ class OstreeInstallerThread(WorkerThread): self._run_ostree_cmd(compose, variant, arch, config, source_repo, output_dir) disc_type = compose.conf.get('disc_types', {}).get('dvd', 'dvd') - filename = compose.get_image_name(arch, variant, disc_type=disc_type, - format=config.get('filename')) + filename = compose.get_image_name(arch, variant, disc_type=disc_type) self._copy_image(compose, variant, arch, filename, output_dir) self._add_to_manifest(compose, variant, arch, filename) self.pool.log_info('[DONE ] %s' % msg) diff --git a/tests/test_ostree_installer_phase.py b/tests/test_ostree_installer_phase.py index 45643dad..6162904b 100644 --- a/tests/test_ostree_installer_phase.py +++ b/tests/test_ostree_installer_phase.py @@ -23,7 +23,6 @@ class OstreeInstallerPhaseTest(helpers.PungiTestCase): "x86_64": { "source_repo_from": "Everything", "release": None, - "filename": "%(release_short)s-%(variant)s-%(arch)s-%(version)s-%(date)s.iso", "installpkgs": ["fedora-productimg-atomic"], "add_template": ["/spin-kickstarts/atomic-installer/lorax-configure-repo.tmpl"], "add_template_var": [ @@ -119,7 +118,6 @@ class OstreeThreadTest(helpers.PungiTestCase): cfg = { 'source_repo_from': 'Everything', 'release': '20160321.n.0', - 'filename': 'Fedora-Atomic.iso', } koji = KojiWrapper.return_value koji.run_runroot_cmd.return_value = { @@ -158,8 +156,7 @@ class OstreeThreadTest(helpers.PungiTestCase): self.assertEqual(get_mtime.call_args_list, [mock.call(final_iso_path)]) self.assertImageAdded(compose, ImageCls, IsoWrapper) self.assertEqual(compose.get_image_name.call_args_list, - [mock.call('x86_64', compose.variants['Everything'], - disc_type='dvd', format='Fedora-Atomic.iso')]) + [mock.call('x86_64', compose.variants['Everything'], disc_type='dvd')]) self.assertTrue(os.path.isdir(self.topdir + '/work/x86_64/Everything/')) self.assertFalse(os.path.isdir(self.topdir + '/work/x86_64/Everything/ostree_installer')) self.assertEqual(run.call_args_list, @@ -185,7 +182,6 @@ class OstreeThreadTest(helpers.PungiTestCase): cfg = { 'source_repo_from': 'Everything', 'release': '20160321.n.0', - 'filename': 'Fedora-Atomic.iso', 'add_template': ['some-file.txt'], } koji = KojiWrapper.return_value @@ -225,7 +221,6 @@ class OstreeThreadTest(helpers.PungiTestCase): cfg = { 'source_repo_from': 'Everything', 'release': '20160321.n.0', - 'filename': 'Fedora-Atomic.iso', 'add_template': ['some_file.txt'], 'add_arch_template': ['other_file.txt'], 'template_repo': 'git://example.com/templates.git', @@ -275,8 +270,7 @@ class OstreeThreadTest(helpers.PungiTestCase): self.assertEqual(get_mtime.call_args_list, [mock.call(final_iso_path)]) self.assertImageAdded(compose, ImageCls, IsoWrapper) self.assertEqual(compose.get_image_name.call_args_list, - [mock.call('x86_64', compose.variants['Everything'], - disc_type='dvd', format='Fedora-Atomic.iso')]) + [mock.call('x86_64', compose.variants['Everything'], disc_type='dvd')]) self.assertTrue(os.path.isdir(self.topdir + '/work/x86_64/Everything/')) self.assertFalse(os.path.isdir(self.topdir + '/work/x86_64/Everything/ostree_installer')) self.assertEqual(run.call_args_list, @@ -359,8 +353,7 @@ class OstreeThreadTest(helpers.PungiTestCase): self.assertEqual(get_mtime.call_args_list, [mock.call(final_iso_path)]) self.assertImageAdded(compose, ImageCls, IsoWrapper) self.assertEqual(compose.get_image_name.call_args_list, - [mock.call('x86_64', compose.variants['Everything'], - disc_type='dvd', format=None)]) + [mock.call('x86_64', compose.variants['Everything'], disc_type='dvd')]) @mock.patch('kobo.shortcuts.run') @mock.patch('productmd.images.Image') @@ -384,7 +377,6 @@ class OstreeThreadTest(helpers.PungiTestCase): cfg = { 'source_repo_from': 'Everything', 'release': None, - 'filename': 'Fedora-Atomic.iso', } koji = KojiWrapper.return_value koji.run_runroot_cmd.side_effect = helpers.boom @@ -419,7 +411,6 @@ class OstreeThreadTest(helpers.PungiTestCase): cfg = { 'source_repo_from': 'Everything', 'release': None, - 'filename': 'Fedora-Atomic.iso', } koji = KojiWrapper.return_value koji.run_runroot_cmd.return_value = {