#!/bin/sh

ver_old="$2"

# Only when upgrading from an older version than 20250917-r0
# and linux-firmware-intel is *not* installed, print message
if [ "$(apk version -t "$ver_old" '20250917-r0')" = '<' ] && \
	! apk info -e linux-firmware-intel > /dev/null; then
	cat >&2 <<-EOF
*
* Important notice if you depend on iwlwifi!
*
* You have linux-firmware-other installed but
* not the linux-firmware-intel package.
*
* If you rely on linux-firmware-other for the
* iwlwifi*.ucode files, they have now moved
* to the linux-firmware-intel subpackage,
*
*   apk add linux-firmware-intel
*
* if you need them.
*
EOF
fi

exit 0
