[ostree-installer] Drop filename setting

This should just use the global default format. Other phases don't have
their own setting either.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-04-14 10:56:12 +02:00
parent ffd054d262
commit e6079e4c85
3 changed files with 4 additions and 18 deletions

View File

@ -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": [

View File

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

View File

@ -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 = {