imagebuilder: fix APK architecture setting
authorRobert Marko <robimarko@gmail.com>
Tue, 19 Nov 2024 13:36:17 +0000 (14:36 +0100)
committerRobert Marko <robimarko@gmail.com>
Tue, 19 Nov 2024 18:52:03 +0000 (19:52 +0100)
commit1c308bad5445df91d901d8389bfe31c888d0e8c9
tree727c66d8813cc171c3e5df97e164e583d7bd3eb8
parent0d0a5eb4b590f6f1f50040a56a35179886b40e62
imagebuilder: fix APK architecture setting

Currently, when "apk add --initdb" is called it will populate the
/etc/apk/arch file with the architecture of the host instead of the target
package architecture and this will then make it impossible for new packages
to be installed on the device as the target architecture will not match
after APK is updated to include [1].

So, lets use override the architecture by passing the target package one
by using the "--arch" argument to "apk add".

[1] https://gitlab.alpinelinux.org/alpine/apk-tools/-/commit/c1a3e69f24e235fc78f4dddb1f85fdf281464446

Fixes: #16953
Link: https://github.com/openwrt/openwrt/pull/17015
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/imagebuilder/files/Makefile