Since APK support was added, the CONTROL directory is created only after
the checksum step. With IPK_FILES_CHECKSUMS enabled, redirecting output
to CONTROL/files-sha256sum fails for packages that do not create CONTROL
themselves. The error is hidden by "|| true", so these packages are built
without checksums and pkg_check skips them. Only base-files still gets
the file.
Create the directory before writing the checksums, as in 23.05, and
drop the "|| true", so that a failure to write the file stops the build
instead of going unnoticed.
Tested with a test package in the main, 25.12 and 24.10 SDKs. The IPKs
contain files-sha256sum matching data.tar.gz, and without the mkdir the
build now fails.
Fixes: d788ab376f ("build: add APK package build capabilities")
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/26257
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>