common/hooks/post-install: support new binfmts hook style

This commit is contained in:
classabbyamp 2024-06-15 12:15:34 -04:00 committed by classabbyamp
parent 0420101ca2
commit f368375437
1 changed files with 7 additions and 1 deletions

View File

@ -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.
#