1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #16514 from aabadie/pr/pkg/avoid_git_fetch

pkg/pkg.mk: avoid git fetch if commit is already there
This commit is contained in:
Francisco 2021-06-02 14:47:08 +02:00 committed by GitHub
commit e5d09fda25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,7 +113,10 @@ $(PKG_PATCHED): $(PKG_PATCHED_PREREQUISITES)
$(PKG_DOWNLOADED): $(MAKEFILE_LIST) | $(PKG_SOURCE_DIR)/.git
$(info [INFO] updating $(PKG_NAME) $(PKG_DOWNLOADED))
$(Q)$(GIT_IN_PKG) fetch $(GIT_QUIET) $(PKG_URL) $(PKG_VERSION)
$(Q)if ! $(GIT_IN_PKG) cat-file -e $(PKG_VERSION); then \
printf "[INFO] fetching new $(PKG_NAME) version "$(PKG_VERSION)"\n"; \
$(GIT_IN_PKG) fetch $(GIT_QUIET) "$(PKG_URL)" "$(PKG_VERSION)"; \
fi
echo $(PKG_VERSION) > $@
$(PKG_SOURCE_DIR)/.git: | $(PKG_CUSTOM_PREPARED)