From 7a6d8303dc98db40ce4c47f13e1124c0036504b8 Mon Sep 17 00:00:00 2001 From: Bohdan Khomutskyi Date: Thu, 13 Aug 2020 10:29:53 +0200 Subject: [PATCH] Replace -c parameter with --config Also, reformat the invocation of Lorax, since Lorax does not accept -c=%s, only -c %s. Jira: RHELCMP-713 Signed-off-by: Bohdan Khomutskyi --- pungi/wrappers/lorax.py | 4 +++- tests/test_lorax_wrapper.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pungi/wrappers/lorax.py b/pungi/wrappers/lorax.py index 7a0ac1b8..6e164c66 100644 --- a/pungi/wrappers/lorax.py +++ b/pungi/wrappers/lorax.py @@ -100,7 +100,9 @@ class LoraxWrapper(object): cmd.append("--squashfs-only") if configuration_file: - cmd.append("-c=%s" % configuration_file) + # Note, at the moment Lorax does not accept --config=%s + cmd.append("--config") + cmd.append(configuration_file) output_dir = os.path.abspath(output_dir) cmd.append(output_dir) diff --git a/tests/test_lorax_wrapper.py b/tests/test_lorax_wrapper.py index d4fc7e85..3eb6f535 100644 --- a/tests/test_lorax_wrapper.py +++ b/tests/test_lorax_wrapper.py @@ -88,7 +88,8 @@ class LoraxWrapperTest(unittest.TestCase): "--dracut-arg=--foo", "--dracut-arg=bar", "--squashfs-only", - "-c=/storage/RHEL-7.8-20200731.n.0/" + "--config", + "/storage/RHEL-7.8-20200731.n.0/" + "logs/x86_64/buildinstall-Server-logs/lorax.conf", "/mnt/output_dir", ],