casync: larger chunk sizes and include file mode (#32110)

add mode
This commit is contained in:
Justin Newberry 2024-04-05 14:06:11 -04:00 committed by GitHub
parent 8a138f9be8
commit 910e32270b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ from openpilot.system.version import BUILD_METADATA_FILENAME, BuildMetadata
from openpilot.system.updated.casync import tar
CASYNC_ARGS = ["--with=symlinks", "--with=permissions", "--compression=xz"]
CASYNC_ARGS = ["--with=symlinks", "--with=permissions", "--compression=xz", "--chunk-size=16M"]
CASYNC_FILES = [BUILD_METADATA_FILENAME]

View File

@ -25,11 +25,11 @@ def create_tar_archive(filename: pathlib.Path, directory: pathlib.Path, include:
info = tarfile.TarInfo(relative_path)
info.size = file.stat().st_size
info.type = tarfile.REGTYPE
info.mode = file.stat().st_mode
with file.open('rb') as f:
tar.addfile(info, f)
def extract_tar_archive(fh: IO[bytes], directory: pathlib.Path):
"""Extracts a tar archive to a directory"""