]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
include: download.mk: do not check PKG_MIRROR_HASH when set to "skip" 20655/head
authorMatthias Franck <matthias.franck@softathome.com>
Wed, 5 Nov 2025 13:43:53 +0000 (14:43 +0100)
committerRobert Marko <robimarko@gmail.com>
Fri, 7 Nov 2025 11:25:42 +0000 (12:25 +0100)
In commit 042996b46bd41292ef1fa2d58e3b824a547f4c55 compilation of git repos is made to fail when PKG_MIRROR_HASH is not correct.

It looks like it was forgotten that in openwrt there is a posibility to set the PKG_MIRROR_HASH to "skip".
In this case the hash check should not be performed and compilation should continue as expected.

This is especially very usefull when doing local testing and development with git repos.

Signed-off-by: Matthias Franck <matthias.franck@softathome.com>
Link: https://github.com/openwrt/openwrt/pull/20655
Signed-off-by: Robert Marko <robimarko@gmail.com>
include/download.mk

index e87501563aa07f427a555065295e96b4b7e474b3..3649da4f88c373ae8fd1f5ab93efb0a09e3471fe 100644 (file)
@@ -159,7 +159,7 @@ $(if $(if $(MIRROR), \
                ( $(3) ) \
                $(if $(filter-out x,$(MIRROR_HASH)), && ( \
                        file_hash="$$$$($(MKHASH) sha256 "$(DL_DIR)/$(FILE)")"; \
-                       [ "$$$$file_hash" = "$(MIRROR_HASH)" ] || { \
+                       [ "$$$$file_hash" = "$(MIRROR_HASH)" ] || [ "$(MIRROR_HASH)" = "skip" ] || { \
                                echo "Hash mismatch for file $(FILE): expected $(MIRROR_HASH), got $$$$file_hash"; \
                                false; \
                        }; \