Update Dockerfile

This commit is contained in:
Kroese
2026-07-28 15:36:08 +02:00
committed by GitHub
parent dd4887fe9e
commit cd9746fdf6
+22 -22
View File
@@ -61,38 +61,38 @@ path = Path(pycdlib.pycdlib.__file__)
text = path.read_text()
old = """\
# The remove_child() method returns True if the parent no longer needs
# the extent that the directory record for this child was on.
if child.parent.remove_child(child, index, self.logical_block_size):
return self.logical_block_size
done = False
while not done:
num_bytes_to_remove += self._remove_child_from_dr(rec,
rec.index_in_parent)
if rec.inode is not None:
"""
new = """\
# The remove_child() method returns True if the parent no longer needs
# the extent that the directory record for this child was on.
if (
index < 0
or index >= len(child.parent.children)
or child.parent.children[index] is not child
):
for actual_index, candidate in enumerate(child.parent.children):
if candidate is child:
index = actual_index
break
else:
raise pycdlibexception.PyCdlibInternalError(
'Child is not present in its recorded parent'
)
done = False
while not done:
# El Torito boot images may be represented by synthetic directory
# records that are linked to an inode but are not actual children
# of a filesystem directory. Only remove the record from its parent
# when it is really present in the parent's children list.
if rec.parent is not None:
for actual_index, child in enumerate(rec.parent.children):
if child is rec:
num_bytes_to_remove += self._remove_child_from_dr(
rec, actual_index
)
break
if child.parent.remove_child(child, index, self.logical_block_size):
return self.logical_block_size
if rec.inode is not None:
"""
count = text.count(old)
if count != 1:
raise SystemExit(
f"Expected exactly one PyCdlib source block, found {count} in {path}"
f"Expected exactly one PyCdlib _rm_dr_link block, "
f"found {count} in {path}"
)
path.write_text(text.replace(old, new, 1))