summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-10-23 22:32:59 +0800
committerruki <[email protected]>2022-10-23 22:33:17 +0800
commit7d8635733e102f55922867d5ea71f4d17806b105 (patch)
tree7c0f3f79ab140af0f62b81a069ec0c6290b9cd67
parent43e5110ea78813523d86bebcb43787e528538b94 (diff)
improve checksum tips #2953
-rw-r--r--xmake/modules/private/action/require/impl/actions/download.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/modules/private/action/require/impl/actions/download.lua b/xmake/modules/private/action/require/impl/actions/download.lua
index 8eca9c973..ddd596305 100644
--- a/xmake/modules/private/action/require/impl/actions/download.lua
+++ b/xmake/modules/private/action/require/impl/actions/download.lua
@@ -162,7 +162,10 @@ function _download(package, url, sourcedir, url_alias, url_excludes)
-- check hash
if sourcehash and sourcehash ~= hash.sha256(packagefile) then
- raise("unmatched checksum!")
+ if package:is_precompiled() then
+ wprint("perhaps the local binary repository is not up to date, please run `xrepo update-repo` to update it and try again!")
+ end
+ raise("unmatched checksum, current hash(%s) != original hash(%s)", hash.sha256(packagefile):sub(1, 8), sourcehash:sub(1, 8))
end
end