From f368375437b57681389cd27e3ae143763199ede1 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sat, 15 Jun 2024 12:15:34 -0400 Subject: [PATCH] common/hooks/post-install: support new binfmts hook style --- .../hooks/post-install/04-create-xbps-metadata-scripts.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/hooks/post-install/04-create-xbps-metadata-scripts.sh b/common/hooks/post-install/04-create-xbps-metadata-scripts.sh index f21017f8361..70152bad55f 100644 --- a/common/hooks/post-install/04-create-xbps-metadata-scripts.sh +++ b/common/hooks/post-install/04-create-xbps-metadata-scripts.sh @@ -119,10 +119,16 @@ _EOF # # Handle binfmts trigger # - if [ -n "${binfmts}" ]; then + if [ -n "${binfmts}" ] || [ -d "${PKGDESTDIR}/usr/share/binfmts" ]; then _add_trigger binfmts + fi + if [ -n "${binfmts}" ]; then echo "export binfmts=\"${binfmts}\"" >> $tmpf fi + if [ -d "${PKGDESTDIR}/usr/share/binfmts" ]; then + _import_binfmts="$(find "${PKGDESTDIR}/usr/share/binfmts" -type f -printf '%f\n')" + echo "export import_binfmts=\"${_import_binfmts}\"" >> $tmpf + fi # # Handle GNU Info files. #