Skip to content

Commit

Permalink
build: prepend ABI suffixes with a dash if package name ends with digit
Browse files Browse the repository at this point in the history
Ensure that ABI suffixes are separated with a dash from the package name if
the name happens to end with a digit. This implementation detail got lost
during the recent refactoring of the ABI_VERSION handling in buildroot.

Ref: openwrt/packages#14237 (comment)
Fixes: c921650 ("build: drop ABI version from metadata")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
  • Loading branch information
jow- committed Jun 14, 2021
1 parent 677813c commit f6a03bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion include/feeds.mk
Expand Up @@ -43,5 +43,11 @@ endef

# 1: package name
define GetABISuffix
$(if $(filter-out kmod-%,$(1)),$(if $(ABIV_$(1)),$(ABIV_$(1)),$(foreach v,$(wildcard $(STAGING_DIR)/pkginfo/$(1).version),$(shell cat $(v)))))
$(call FormatABISuffix,$(1),$(if $(ABIV_$(1)),$(ABIV_$(1)),$(foreach v,$(wildcard $(STAGING_DIR)/pkginfo/$(1).version),$(shell cat $(v)))))
endef

# 1: package name
# 2: abi version
define FormatABISuffix
$(if $(filter-out kmod-%,$(1)),$(if $(2),$(if $(filter %0 %1 %2 %3 %4 %5 %6 %7 %8 %9,$(1)),-)$(2)))
endef
2 changes: 1 addition & 1 deletion include/package-ipkg.mk
Expand Up @@ -99,7 +99,7 @@ _endef=endef

ifeq ($(DUMP),)
define BuildTarget/ipkg
ABIV_$(1):=$(if $(filter-out kmod-%,$(1)),$(ABI_VERSION))
ABIV_$(1):=$(call FormatABISuffix,$(1),$(ABI_VERSION))
PDIR_$(1):=$(call FeedPackageDir,$(1))
IPKG_$(1):=$$(PDIR_$(1))/$(1)$$(ABIV_$(1))_$(VERSION)_$(PKGARCH).ipk
IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg-$(PKGARCH)/$(1)
Expand Down

0 comments on commit f6a03bf

Please sign in to comment.