From 022a4d36f5bdb5cf01f8ee0dc5838bf73fb12dc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Thu, 26 May 2016 09:58:56 +0200 Subject: [PATCH] [ostree-installer] Put images to os/ directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of putting everything to //iso, move images/, EFI/ and isolinux/ subdirs to //os. The nicely named ISO image is still in the original location. Signed-off-by: Lubomír Sedlář --- pungi/phases/ostree_installer.py | 3 ++- tests/test_ostree_installer_phase.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pungi/phases/ostree_installer.py b/pungi/phases/ostree_installer.py index 5d8a7628..7e295396 100644 --- a/pungi/phases/ostree_installer.py +++ b/pungi/phases/ostree_installer.py @@ -91,10 +91,11 @@ class OstreeInstallerThread(WorkerThread): def _copy_image(self, compose, variant, arch, filename, output_dir): iso_path = compose.paths.compose.iso_path(arch, variant, filename) + os_path = compose.paths.compose.os_tree(arch, variant) boot_iso = os.path.join(output_dir, 'images', 'boot.iso') shortcuts.run('cp -av %s/* %s/' % - (pipes.quote(output_dir), pipes.quote(os.path.dirname(iso_path)))) + (pipes.quote(output_dir), pipes.quote(os_path))) try: os.link(boot_iso, iso_path) except OSError: diff --git a/tests/test_ostree_installer_phase.py b/tests/test_ostree_installer_phase.py index bcc36937..be4dbbdf 100644 --- a/tests/test_ostree_installer_phase.py +++ b/tests/test_ostree_installer_phase.py @@ -160,7 +160,7 @@ class OstreeThreadTest(helpers.PungiTestCase): 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, - [mock.call('cp -av {0}/work/x86_64/Everything/ostree_installer/* {0}/compose/Everything/x86_64/iso/'.format(self.topdir))]) + [mock.call('cp -av {0}/work/x86_64/Everything/ostree_installer/* {0}/compose/Everything/x86_64/os/'.format(self.topdir))]) @mock.patch('kobo.shortcuts.run') @mock.patch('productmd.images.Image') @@ -223,7 +223,7 @@ class OstreeThreadTest(helpers.PungiTestCase): 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, - [mock.call('cp -av {0}/work/x86_64/Everything/ostree_installer/* {0}/compose/Everything/x86_64/iso/'.format(self.topdir))]) + [mock.call('cp -av {0}/work/x86_64/Everything/ostree_installer/* {0}/compose/Everything/x86_64/os/'.format(self.topdir))]) @mock.patch('kobo.shortcuts.run') @mock.patch('productmd.images.Image') @@ -337,7 +337,7 @@ class OstreeThreadTest(helpers.PungiTestCase): 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, - [mock.call('cp -av {0}/work/x86_64/Everything/ostree_installer/* {0}/compose/Everything/x86_64/iso/'.format(self.topdir))]) + [mock.call('cp -av {0}/work/x86_64/Everything/ostree_installer/* {0}/compose/Everything/x86_64/os/'.format(self.topdir))]) @mock.patch('kobo.shortcuts.run') @mock.patch('productmd.images.Image')