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