mirror of
https://github.com/dockur/windows.git
synced 2026-07-28 21:53:34 +07:00
Update Dockerfile
This commit is contained in:
+41
@@ -52,6 +52,47 @@ FROM build-${TARGETARCH}
|
||||
ARG VERSION_PYCDLIB="1.16.0"
|
||||
RUN python3 -m pip install --break-system-packages --no-cache-dir "pycdlib==${VERSION_PYCDLIB}"
|
||||
|
||||
RUN python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
|
||||
path = Path(
|
||||
"/usr/local/lib/python3.13/dist-packages/pycdlib/pycdlib.py"
|
||||
)
|
||||
|
||||
text = path.read_text()
|
||||
|
||||
old = """\
|
||||
num_bytes_to_remove = child.parent.remove_child(
|
||||
child, index, self.logical_block_size
|
||||
)
|
||||
"""
|
||||
|
||||
new = """\
|
||||
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'
|
||||
)
|
||||
|
||||
num_bytes_to_remove = child.parent.remove_child(
|
||||
child, index, self.logical_block_size
|
||||
)
|
||||
"""
|
||||
|
||||
if old not in text:
|
||||
raise SystemExit("Expected PyCdlib source block not found")
|
||||
|
||||
path.write_text(text.replace(old, new, 1))
|
||||
PY
|
||||
|
||||
ARG VERSION_ARG="0.00"
|
||||
RUN echo "$VERSION_ARG" > /etc/version
|
||||
|
||||
|
||||
Reference in New Issue
Block a user