commit:     9204a85aa79b5dec8dbed5a50e9c7774f7c43d90
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  6 09:21:07 2026 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Jan  6 09:22:01 2026 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=9204a85a

Only generate contents file when not renaming the output

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 catalyst/base/stagebase.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index f290da92..80668f65 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -1490,8 +1490,11 @@ class StageBase(TargetBase, ClearBase, GenBase):
                     log.notice("Renaming %s to %s", target_filename, 
target_renameto)
                     os.rename(target_filename, target_renameto)
                     target_filename = target_renameto
+            else:
+                # we can only do this when *not* renaming, since the renaming
+                # might change the file extension and confuse the compression 
logic
+                self.gen_contents_file(target_filename)
 
-            self.gen_contents_file(target_filename)
             self.gen_digest_file(target_filename)
             self.resume.enable("capture")
         else:

Reply via email to