diff --git a/pungi/phases/gather/methods/method_hybrid.py b/pungi/phases/gather/methods/method_hybrid.py index e3f836c6..4e469df4 100644 --- a/pungi/phases/gather/methods/method_hybrid.py +++ b/pungi/phases/gather/methods/method_hybrid.py @@ -208,7 +208,12 @@ class GatherMethodHybrid(pungi.phases.gather.method.GatherMethodBase): logfile = self.compose.paths.log.log_file( arch, "hybrid-depsolver-%s-iter-%d" % (variant, step) ) - run(cmd, logfile=logfile, show_cmd=True) + # Adding this environement variable will tell GLib not to prefix + # any log messages with the PID of the fus process (which is quite + # useless for us anyway). + env = os.environ.copy() + env["G_MESSAGES_PREFIXED"] = "" + run(cmd, logfile=logfile, show_cmd=True, env=env) output = fus.parse_output(logfile) new_multilib = self.add_multilib(variant, arch, output) if new_multilib: diff --git a/tests/test_gather_method_hybrid.py b/tests/test_gather_method_hybrid.py index c6d7d0da..551a4451 100644 --- a/tests/test_gather_method_hybrid.py +++ b/tests/test_gather_method_hybrid.py @@ -331,7 +331,11 @@ class TestRunSolver(HelperMixin, helpers.PungiTestCase): self.assertEqual(po.call_args_list, [mock.call(self.logfile1)]) self.assertEqual( run.call_args_list, - [mock.call(gc.return_value, logfile=self.logfile1, show_cmd=True)], + [ + mock.call( + gc.return_value, logfile=self.logfile1, show_cmd=True, env=mock.ANY + ) + ], ) self.assertEqual( gc.call_args_list, @@ -360,7 +364,11 @@ class TestRunSolver(HelperMixin, helpers.PungiTestCase): self.assertEqual(po.call_args_list, [mock.call(self.logfile1)]) self.assertEqual( run.call_args_list, - [mock.call(gc.return_value, logfile=self.logfile1, show_cmd=True)], + [ + mock.call( + gc.return_value, logfile=self.logfile1, show_cmd=True, env=mock.ANY + ) + ], ) self.assertEqual( gc.call_args_list, @@ -386,8 +394,12 @@ class TestRunSolver(HelperMixin, helpers.PungiTestCase): self.assertEqual( run.call_args_list, [ - mock.call(gc.return_value, logfile=self.logfile1, show_cmd=True), - mock.call(gc.return_value, logfile=self.logfile2, show_cmd=True), + mock.call( + gc.return_value, logfile=self.logfile1, show_cmd=True, env=mock.ANY + ), + mock.call( + gc.return_value, logfile=self.logfile2, show_cmd=True, env=mock.ANY + ), ], ) self.assertEqual( @@ -448,8 +460,12 @@ class TestRunSolver(HelperMixin, helpers.PungiTestCase): self.assertEqual( run.call_args_list, [ - mock.call(gc.return_value, logfile=self.logfile1, show_cmd=True), - mock.call(gc.return_value, logfile=self.logfile2, show_cmd=True), + mock.call( + gc.return_value, logfile=self.logfile1, show_cmd=True, env=mock.ANY + ), + mock.call( + gc.return_value, logfile=self.logfile2, show_cmd=True, env=mock.ANY + ), ], ) self.assertEqual( @@ -541,8 +557,12 @@ class TestRunSolver(HelperMixin, helpers.PungiTestCase): self.assertEqual( run.call_args_list, [ - mock.call(gc.return_value, logfile=self.logfile1, show_cmd=True), - mock.call(gc.return_value, logfile=self.logfile2, show_cmd=True), + mock.call( + gc.return_value, logfile=self.logfile1, show_cmd=True, env=mock.ANY + ), + mock.call( + gc.return_value, logfile=self.logfile2, show_cmd=True, env=mock.ANY + ), ], ) self.assertEqual(