Allow overriding the VCS exclude list with *_OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS
PATCH 1/1 Allow overriding the VCS exclude list with *_OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS
We have some internal packages which automatically bake a version string from the git checkout, and we usually combine these with a *_OVERRIDE_SRCDIR. I would like to let Buildroot *not* skip the .git directory when picking up sources from the local checkout. It turns out that the existing mechanism (*_OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS) only supports adding to the exclude list because rsync simply uses the first match from the provided filtering rules.
Solve this by using the user-provided values first. If they match, then rsync won't exclude stuff based on the generic VCS exclude patterns.
--- package/pkg-generic.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkg-generic.mk +1 -1
@@ -184,7 +184,7 @@ $(BUILD_DIR)/%/.stamp_rsynced: @mkdir -p $(@D) $(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) + rsync -au --chmod=u=rwX,go=rX $($(PKG)_OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS) $(RSYNC_VCS_EXCLUSIONS) $(call qstrip,$(SRCDIR))/ $(@D) $(foreach hook,$($(PKG)_POST_RSYNC_HOOKS),$(call $(hook))$(sep)) @$(call step_end,rsync) $(Q)touch $@
Signature · 1 line
2.21.0
Arnout Vandecappelle
AppliedPATCH 1/1 Allow overriding the VCS exclude list with *_OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS
Quoted 8 lines · Jan Kundr?t
We have some internal packages which automatically bake a version string from the git checkout, and we usually combine these with a
*_OVERRIDE_SRCDIR. I would like to let Buildroot *not* skip the .git directory when picking up sources from the local checkout. It turns out that the existing mechanism (*_OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS) only supports adding to the exclude list becausersyncsimply uses the first match from the provided filtering rules.
Quoted 4 lines
Solve this by using the user-provided values first. If they match, then
rsyncwon't exclude stuff based on the generic VCS exclude patterns.Signed-off-by Jan Kundr?t <[email protected]>
Applied to master, thanks.
Could you also add this information to the end ofdocs/manual/using-buildroot-development.txt ?
Regards,
Arnout
Quoted 18 lines
--- package/pkg-generic.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)package/pkg-generic.mk +1
-1@@ -184,7 +184,7 @@ $(BUILD_DIR)/%/.stamp_rsynced: @mkdir -p $(@D) $(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) + rsync -au --chmod=u=rwX,go=rX $($(PKG)_OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS) $(RSYNC_VCS_EXCLUSIONS) $(call qstrip,$(SRCDIR))/ $(@D) $(foreach hook,$($(PKG)_POST_RSYNC_HOOKS),$(call $(hook))$(sep)) @$(call step_end,rsync) $(Q)touch $@
PATCH 1/1 Allow overriding the VCS exclude list with *_OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS
In reply to Jan KundrátQuoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Jan" == Jan Kundr?t <[email protected]> writes:
We have some internal packages which automatically bake a version string from the git checkout, and we usually combine these with a
*_OVERRIDE_SRCDIR. I would like to let Buildroot *not* skip the .git directory when picking up sources from the local checkout. It turns out that the existing mechanism (*_OVERRIDE_SRCDIR_RSYNC_EXCLUSIONS) only supports adding to the exclude list becausersyncsimply uses the first match from the provided filtering rules.
Quoted 4 lines
Solve this by using the user-provided values first. If they match, then
rsyncwon't exclude stuff based on the generic VCS exclude patterns.Signed-off-by Jan Kundr?t <[email protected]>
Committed to 2019.02.x and 2019.05.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard