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

pkg/pkg.mk: avoid git fetch if version is already there

This commit is contained in:
Alexandre Abadie 2021-05-30 11:16:52 +02:00
parent 3d18f1ad67
commit 025e5db592
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

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)