diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-06-20 21:02:06 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-09-04 13:18:24 +0200 |
commit | 193366ee23f862df6607ed1724b909c59e603fbc (patch) | |
tree | 304ca4faf39005a1c896f9bdf6ca783093996d7c | |
parent | 6e0bd490140fcdbf577cf35671bf68f537d19ecc (diff) | |
download | upstream-193366ee23f862df6607ed1724b909c59e603fbc.tar.gz upstream-193366ee23f862df6607ed1724b909c59e603fbc.tar.bz2 upstream-193366ee23f862df6607ed1724b909c59e603fbc.zip |
metadata: handle ABI version rebuild tracking for transient dependencies
Extend the packageauxvars database to keep a list of possible package
dependencies for each provider, then utilize this information in buildroot
to resolve the ABI version dependencies of dependent packages up to five
levels deep.
This should properly trigger rebuilds for packages indirectly depending
on other packages whose ABI_VERSION changed.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 27a4a71c240875e3fff868f26f723178bf94eb86)
-rw-r--r-- | include/package.mk | 30 | ||||
-rwxr-xr-x | scripts/package-metadata.pl | 12 |
2 files changed, 33 insertions, 9 deletions
diff --git a/include/package.mk b/include/package.mk index 569ad647d6..06ff21b0b0 100644 --- a/include/package.mk +++ b/include/package.mk @@ -53,14 +53,26 @@ endif include $(INCLUDE_DIR)/quilt.mk -find_library_dependencies = $(wildcard $(patsubst %,$(STAGING_DIR)/pkginfo/%.version, \ - $(filter-out $(BUILD_PACKAGES),$(foreach dep, \ - $(filter-out @%, $(patsubst +%,%,$(1))), \ - $(if $(findstring :,$(dep)), \ - $(word 2,$(subst :,$(space),$(dep))), \ - $(dep) \ - ) \ - )))) +find_library_dependencies = \ + $(wildcard $(patsubst %,$(STAGING_DIR)/pkginfo/%.version, \ + $(sort $(foreach dep4, \ + $(sort $(foreach dep3, \ + $(sort $(foreach dep2, \ + $(sort $(foreach dep1, \ + $(sort $(foreach dep0, \ + $(Package/$(1)/depends), \ + $(Package/$(dep0)/depends) $(dep0) \ + )), \ + $(Package/$(dep1)/depends) $(dep1) \ + )), \ + $(Package/$(dep2)/depends) $(dep2) \ + )), \ + $(Package/$(dep3)/depends) $(dep3) \ + )), \ + $(Package/$(dep4)/depends) $(dep4) \ + )), \ + )) + PKG_DIR_NAME:=$(lastword $(subst /,$(space),$(CURDIR))) STAMP_NO_AUTOREBUILD=$(wildcard $(PKG_BUILD_DIR)/.no_autorebuild) @@ -258,7 +270,7 @@ endef endif BUILD_PACKAGES += $(1) - $(STAMP_PREPARED): $$(if $(QUILT)$(DUMP),,$(call find_library_dependencies,$(DEPENDS))) + $(STAMP_PREPARED): $$(if $(QUILT)$(DUMP),,$(call find_library_dependencies,$(1))) $(foreach FIELD, TITLE CATEGORY SECTION VERSION, ifeq ($($(FIELD)),) diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 27215f5e57..5abc1bdef3 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -547,6 +547,18 @@ sub gen_package_auxiliary() { print "Package/$n/abiversion = $abiv\n"; } } + my %depends; + foreach my $dep (@{$pkg->{depends} || []}) { + if ($dep =~ m!^\+?(?:[^:]+:)?([^@]+)$!) { + $depends{$1}++; + } + } + my @depends = sort keys %depends; + if (@depends > 0) { + foreach my $n (@{$pkg->{provides}}) { + print "Package/$n/depends = @depends\n"; + } + } } } |