From c92165038217e49075098479704da58a2a3a89bd Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 12 Feb 2021 11:16:35 +0100 Subject: build: drop ABI version from metadata Preparation for supporting dynamic ABI versions that depend on the runtime configuration. Read the suffix from the staging dir pkginfo version files. Signed-off-by: Felix Fietkau --- include/feeds.mk | 2 +- include/package-dumpinfo.mk | 3 +-- include/package-ipkg.mk | 9 +++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/feeds.mk b/include/feeds.mk index ef5fef7f4b..5676cc4a8f 100644 --- a/include/feeds.mk +++ b/include/feeds.mk @@ -43,5 +43,5 @@ endef # 1: package name define GetABISuffix -$(if $(filter-out kmod-%,$(1)),$(if $(Package/$(1)/abiversion),$(if $(filter %0 %1 %2 %3 %4 %5 %6 %7 %8 %9,$(1)),-)$(Package/$(1)/abiversion))) +$(if $(filter-out kmod-%,$(1)),$(foreach v,$(wildcard $(STAGING_DIR)/pkginfo/$(1).version),$(shell cat $(v)))) endef diff --git a/include/package-dumpinfo.mk b/include/package-dumpinfo.mk index 30b0187f11..597452e4b9 100644 --- a/include/package-dumpinfo.mk +++ b/include/package-dumpinfo.mk @@ -21,8 +21,7 @@ $(if $(MENU),Menu: $(MENU) )$(if $(DEFAULT),Default: $(DEFAULT) )$(if $(findstring $(PREREQ_CHECK),1),Prereq-Check: 1 )Version: $(VERSION) -$(if $(ABI_VERSION),ABIVersion: $(ABI_VERSION) -)Depends: $(call PKG_FIXUP_DEPENDS,$(1),$(DEPENDS)) +Depends: $(call PKG_FIXUP_DEPENDS,$(1),$(DEPENDS)) Conflicts: $(CONFLICTS) Menu-Depends: $(MDEPENDS) Provides: $(PROVIDES) diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index fb1b7549fb..e89276ed1a 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -99,7 +99,7 @@ _endef=endef ifeq ($(DUMP),) define BuildTarget/ipkg - ABIV_$(1):=$(call GetABISuffix,$(1)) + ABIV_$(1):=$(if $(filter-out kmod-%,$(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) @@ -157,7 +157,12 @@ ifeq ($(DUMP),) $(STAGING_DIR_ROOT)/stamp/.$(1)_installed: $(PKG_BUILD_DIR)/.pkgdir/$(1).installed mkdir -p $(STAGING_DIR_ROOT)/stamp - $(if $(ABI_VERSION),echo '$(ABI_VERSION)' | cmp -s - $(PKG_INFO_DIR)/$(1).version || echo '$(ABI_VERSION)' > $(PKG_INFO_DIR)/$(1).version) + $(if $(ABI_VERSION),echo '$(ABI_VERSION)' | cmp -s - $(PKG_INFO_DIR)/$(1).version || \ + echo '$(ABI_VERSION)' > $(PKG_INFO_DIR)/$(1).version \ + $(foreach pkg,$(filter-out $(1),$(PROVIDES)),; \ + cp $(PKG_INFO_DIR)/$(1).version $(PKG_INFO_DIR)/$(pkg).version \ + ) \ + ) $(call locked,$(CP) $(PKG_BUILD_DIR)/.pkgdir/$(1)/. $(STAGING_DIR_ROOT)/,root-copy) touch $$@ -- cgit v1.2.3