diff --git a/ldnp/abstractpackager.py b/ldnp/abstractpackager.py index 616bc17..18c605a 100644 --- a/ldnp/abstractpackager.py +++ b/ldnp/abstractpackager.py @@ -157,6 +157,9 @@ def find_systemd_files(self) -> Iterable[Path]: return files + def find_binfmt_files(self) -> Iterable[Path]: + return self._find_file_paths_in_directory(self.appdir_install_path / AppDir.BINFMT_D_RELATIVE_LOCATION) + def copy_data_to_usr(self): def create_relative_symlink(src: Path, dst: Path): # 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): for systemd_file in self.find_systemd_files(): deploy_file_as_is(systemd_file) + for binfmt_d_file in self.find_binfmt_files(): + deploy_file_as_is(binfmt_d_file) + def copy_appdir_contents(self): if os.path.exists(self.appdir_install_path): shutil.rmtree(self.appdir_install_path) diff --git a/ldnp/appdir.py b/ldnp/appdir.py index 40189da..1be1762 100644 --- a/ldnp/appdir.py +++ b/ldnp/appdir.py @@ -19,6 +19,7 @@ class AppDir: SYSTEMD_RELATIVE_LOCATIONS = [ "usr/lib/systemd", ] + BINFMT_D_RELATIVE_LOCATION = "usr/lib/binfmt.d" def __init__(self, path: str | os.PathLike): self.path = Path(path)