mirror of
https://github.com/dockur/windows.git
synced 2026-07-28 21:53:34 +07:00
Update Dockerfile
This commit is contained in:
+22
-22
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user