From 685e602b325dd4132705599406efa418ca3cf3bf Mon Sep 17 00:00:00 2001 From: Daniel Garcia Moreno Date: Thu, 28 Aug 2025 13:22:24 +0200 Subject: [PATCH] Check continuation block to detect Rock Ridge version This patch moves the _set_rock_ridge method call after the continuation is parsed and sets the max version detected between dr_entries and ce_entries. This issue was detected parsing new openSUSE Tumbleweed iso. Looks like mkisofs starts using continuation area ('CE') blobs if file name length is > 92 and PX record could be there, affecting the version detection: https://bugzilla.suse.com/show_bug.cgi?id=1209983#c15 --- pycdlib/pycdlib.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pycdlib/pycdlib.py b/pycdlib/pycdlib.py index 2a9ef720..7e073d0c 100644 --- a/pycdlib/pycdlib.py +++ b/pycdlib/pycdlib.py @@ -1052,8 +1052,6 @@ def _walk_directories(self, vd, extent_to_ptr, extent_to_inode, dir_record) offset += lenbyte - self._set_rock_ridge(rr) - # Cache some properties of this record for later use. is_symlink = new_record.is_symlink() dots = new_record.is_dot() or new_record.is_dotdot() @@ -1115,6 +1113,7 @@ def _walk_directories(self, vd, extent_to_ptr, extent_to_inode, # will eventually be used to fix the PVD size. lastbyte = max(lastbyte, new_end) + rr_ce = '' if new_record.rock_ridge is not None and new_record.rock_ridge.dr_entries.ce_record is not None: ce_record = new_record.rock_ridge.dr_entries.ce_record orig_pos = cdfp.tell() @@ -1130,6 +1129,12 @@ def _walk_directories(self, vd, extent_to_ptr, extent_to_inode, ce_record.len_cont_area) new_record.rock_ridge.update_ce_block(block) + rr_ce = new_record.rock_ridge.rr_version if new_record.rock_ridge else '' + # The PX record could be in the continuation blob, so + # the continuation is relevant to determine the actual + # Rock Ridge version + self._set_rock_ridge(max(rr, rr_ce)) + if rr_cl: child_links.append(new_record)