imagebuilder: reset pkg_ver for each package

FormatPackages only assigns pkg_ver when a package carries a version,
so every package that follows a pinned one inherits its version. With
PACKAGES="foo=1.0" all default packages then become "name=1.0" and apk
fails to resolve the world. The built-in base-files, libc and kernel
pins come last and hide this; user packages are listed first. Set
pkg_ver for every package, empty when none is given.

Fixes: 31cdd13d22 ("imagebuilder: add ABI suffix to packages when using apk")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle committed 2026-10-20 15:58:07 +01:00
1 parent 0d245fdaea
commit 2f4311dfff
1 file changed
+1 -1
+1 -1
View File
@@ -178,7 +178,7 @@ endef
define FormatPackages
$(strip $(foreach pkg,$(strip $(subst ",,$(1))),
$(eval pkg_name:=$(firstword $(subst =, ,$(pkg))))
$(if $(findstring =,$(pkg)),$(eval pkg_ver:==$(lastword $(subst =, ,$(pkg)))))
$(eval pkg_ver:=$(if $(findstring =,$(pkg)),=$(lastword $(subst =, ,$(pkg)))))
$(pkg_name)$(call GetABISuffix,$(pkg_name))$(pkg_ver)
))
endef