Skip to content

Commit af9b82d

Browse files
committed
Deploy binfmt.d files
1 parent b29b359 commit af9b82d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

ldnp/abstractpackager.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ def find_systemd_files(self) -> Iterable[Path]:
157157

158158
return files
159159

160+
def find_binfmt_files(self) -> Iterable[Path]:
161+
return self._find_file_paths_in_directory(self.appdir_install_path / AppDir.BINFMT_D_RELATIVE_LOCATION)
162+
160163
def copy_data_to_usr(self):
161164
def create_relative_symlink(src: Path, dst: Path):
162165
# to calculate the amount of parent directories we need to move up, we can't use relative_to directly
@@ -267,6 +270,9 @@ def deploy_file_as_is(path):
267270
for systemd_file in self.find_systemd_files():
268271
deploy_file_as_is(systemd_file)
269272

273+
for binfmt_d_file in self.find_binfmt_files():
274+
deploy_file_as_is(binfmt_d_file)
275+
270276
def copy_appdir_contents(self):
271277
if os.path.exists(self.appdir_install_path):
272278
shutil.rmtree(self.appdir_install_path)

ldnp/appdir.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class AppDir:
1919
SYSTEMD_RELATIVE_LOCATIONS = [
2020
"usr/lib/systemd",
2121
]
22+
BINFMT_D_RELATIVE_LOCATION = "usr/lib/binfmt.d"
2223

2324
def __init__(self, path: str | os.PathLike):
2425
self.path = Path(path)

0 commit comments

Comments
 (0)