Skip to content

Commit cf877b1

Browse files
map-bGeorgeSapkin
andcommitted
Revert "imagebuilder: add ABI suffix to packages when using apk"
This reverts commit 31cdd13. After working with George we found that adding the ABI suffix to the imagebuilder packages install process in apk cases is problematic [1]. Ideally, ABI suffixes should only appear in the dependencies of other packages, that means they should not be added to apk's world because it will not be possible to satisfy the constraint (in ASU sysupgrades) when the abi-versioned package gets upgraded in the remote repositories, apk's world should only contains the packages names without abi suffixes. Anyway, it is possible to add them to apk world and this is handled correctly in sysupgrade paths and ASU's clients and server by removing the abi-suffixes from the package lists before making the config backups and sending the sysupgrade image requests. Return to the previous state since the basename of abi-packages (without the ABI suffix) can and should be handled correctly by the apk-backed imagebuilder system. [1]: openwrt#21747 Co-authored-by: George Sapkin <george@sapk.in> Signed-off-by: Mario Andrés Pérez <mapb_@outlook.com>
1 parent d8e3953 commit cf877b1

1 file changed

Lines changed: 4 additions & 28 deletions

File tree

target/imagebuilder/files/Makefile

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -145,32 +145,6 @@ BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel)
145145
BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES))
146146
BUILD_PACKAGES:=$(USER_PACKAGES) $(BUILD_PACKAGES)
147147
BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES))
148-
149-
ifneq ($(CONFIG_USE_APK),)
150-
BUILD_PACKAGES+= \
151-
"base-files=$(BASE_FILES_VERSION)" \
152-
"libc=$(LIBC_VERSION)" \
153-
"kernel=$(KERNEL_VERSION)"
154-
endif
155-
156-
# Get ABI version suffix for a package from an apk index
157-
#
158-
# 1: package name
159-
define GetABISuffix
160-
$(shell $(APK) query --fields tags --match provides $(1) | grep openwrt:abiversion | awk -F= '{print $$2; exit}')
161-
endef
162-
163-
# Format packages by adding an ABI version suffix if found
164-
#
165-
# 1: list of packages
166-
define FormatPackages
167-
$(strip $(foreach pkg,$(strip $(subst ",,$(1))),
168-
$(eval pkg_name:=$(firstword $(subst =, ,$(pkg))))
169-
$(if $(findstring =,$(pkg)),$(eval pkg_ver:==$(lastword $(subst =, ,$(pkg)))))
170-
$(pkg_name)$(call GetABISuffix,$(pkg_name))$(pkg_ver)
171-
))
172-
endef
173-
174148
PACKAGES:=
175149

176150
_call_image: staging_dir/host/.prereq-build
@@ -255,8 +229,10 @@ ifeq ($(CONFIG_USE_APK),)
255229
$(OPKG) install $(wildcard $(PACKAGE_DIR)/kernel_*.ipk)
256230
$(OPKG) install $(BUILD_PACKAGES)
257231
else
258-
$(eval BUILD_PACKAGES:=$(call FormatPackages,$(BUILD_PACKAGES)))
259-
$(APK) add --arch $(ARCH_PACKAGES) --no-scripts $(BUILD_PACKAGES)
232+
$(APK) add --arch $(ARCH_PACKAGES) --no-scripts $(BUILD_PACKAGES) \
233+
"base-files=$(BASE_FILES_VERSION)" \
234+
"libc=$(LIBC_VERSION)" \
235+
"kernel=$(KERNEL_VERSION)"
260236
endif
261237

262238
prepare_rootfs: FORCE

0 commit comments

Comments
 (0)