Skip to content

Commit

Permalink
Deploy binfmt.d files
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAssassin committed Nov 27, 2024
1 parent b29b359 commit af9b82d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ldnp/abstractpackager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions ldnp/appdir.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit af9b82d

Please sign in to comment.