]> git.ipfire.org Git - pbs.git/commitdiff
config: Log the generated configuration
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 3 May 2023 09:19:17 +0000 (09:19 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 3 May 2023 09:19:17 +0000 (09:19 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/config.py

index a7ea57bbd7674b200dac10eb86c824f5edfc3301..963973f7692b9e406ac267151f6830ca0f744356 100644 (file)
@@ -40,10 +40,12 @@ class PakfireConfig(base.Object):
                                self.add_repo(repo)
 
        def __str__(self):
-               buffer = io.StringIO()
-
-               # Generate the configuration
                config = self._make_config()
+
+               return self._to_string(config)
+
+       def _to_string(self, config):
+               buffer = io.StringIO()
                config.write(buffer)
 
                return buffer.getvalue()
@@ -72,6 +74,8 @@ class PakfireConfig(base.Object):
                # Make configuration
                config = self._make_config(local=True)
 
+               log.error("Launching Pakfire with configuration:\n%s", self._to_string(config))
+
                with self.backend.tempfile(mode="w+") as t:
                        # Write the configuration to disk
                        config.write(t)