core/pkg-infra: add missing step hooks
PATCH 1/1 core/pkg-infra: add missing step hooks
Also call the step hooks from the three steps they are currently not called in:
- download,
- actual download (when main archive is not the real source, like external toolchains),
- rsync (for local or override-srcdir).
Reported-by Thomas Petazzoni <[email protected]>
Signed-off-by "Yann E. MORIN" <[email protected]>
Cc Thomas Petazzoni <[email protected]>
--- package/pkg-generic.mk | 6 ++++++ 1 file changed, 6 insertions(+)
package/pkg-generic.mk +6 -0
@@ -134,6 +134,7 @@ endif # Retrieve the archive $(BUILD_DIR)/%/.stamp_downloaded: + @$(call step_start,download) $(foreach hook,$($(PKG)_PRE_DOWNLOAD_HOOKS),$(call $(hook))$(sep)) # Only show the download message if it isn't already downloaded $(Q)for p in $($(PKG)_ALL_DOWNLOADS); do \
@@ -145,12 +146,15 @@ $(BUILD_DIR)/%/.stamp_downloaded: $(foreach p,$($(PKG)_ALL_DOWNLOADS),$(call DOWNLOAD,$(p))$(sep)) $(foreach hook,$($(PKG)_POST_DOWNLOAD_HOOKS),$(call $(hook))$(sep)) $(Q)mkdir -p $(@D) + @$(call step_end,download) $(Q)touch $@ # Retrieve actual source archive, e.g. for prebuilt external toolchains $(BUILD_DIR)/%/.stamp_actual_downloaded: + @$(call step_start,actual-download) $(call DOWNLOAD,$($(PKG)_ACTUAL_SOURCE_SITE)/$($(PKG)_ACTUAL_SOURCE_TARBALL)) $(Q)mkdir -p $(@D) + @$(call step_end,actual-download) $(Q)touch $@ # Unpack the archive
@@ -169,11 +173,13 @@ $(BUILD_DIR)/%/.stamp_extracted: # Rsync the source directory if the <pkg>_OVERRIDE_SRCDIR feature is # used. $(BUILD_DIR)/%/.stamp_rsynced: + @$(call step_start,rsync) @$(call MESSAGE,"Syncing from source dir $(SRCDIR)") $(foreach hook,$($(PKG)_PRE_RSYNC_HOOKS),$(call $(hook))$(sep)) @test -d $(SRCDIR) || (echo "ERROR: $(SRCDIR) does not exist" ; exit 1) rsync -au --chmod=u=rwX,go=rX $(RSYNC_VCS_EXCLUSIONS) $($(PKG)_OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS) $(call qstrip,$(SRCDIR))/ $(@D) $(foreach hook,$($(PKG)_POST_RSYNC_HOOKS),$(call $(hook))$(sep)) + @$(call step_end,rsync) $(Q)touch $@ # Patch
Signature · 1 line
2.14.1
Thomas Petazzoni
AppliedPATCH 1/1 core/pkg-infra: add missing step hooks
Hello,
Quoted 7 lines · Yann E. MORIN
Also call the step hooks from the three steps they are currently not called in:
- download,
- actual download (when main archive is not the real source, like external toolchains),
- rsync (for local or override-srcdir).
Quoted 6 lines
Reported-by Thomas Petazzoni <[email protected]>Signed-off-by "Yann E. MORIN" <[email protected]>Cc Thomas Petazzoni <[email protected]>--- package/pkg-generic.mk | 6 ++++++ 1 file changed, 6 insertions(+)
Applied to next, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com