Closed gouriano closed 1 week ago
I mean SHA256 is intentionally wrong
Hi @gouriano thanks for your question.
Without having the code for your conanfile I can't confirm, but it's probable that you are not properly passing the sha256
from the conandata.yml
to the get()
call.
In fact, in https://github.com/ncbi/ncbi-cxx-toolkit-conan/blob/master/conanfile.py#L226, which might be the origin of your issue, you would also need to get the sha256
to pass it to the get function, something like:
tk_url = self.conan_data["sources"][self.version]["url"] if "url" in self.conan_data["sources"][self.version].keys() else ""
+ tk_checksum = self.conan_data["sources"][self.version].get("sha256", None)
tk_git = self.conan_data["sources"][self.version]["git"] if "git" in self.conan_data["sources"][self.version].keys() else ""
tk_branch = self.conan_data["sources"][self.version]["branch"] if "branch" in self.conan_data["sources"][self.version].keys() else "main"
if tk_url != None and tk_url != "":
print("from url: " + tk_url)
try:
- get(self, tk_url, strip_root = True)
+ get(self, tk_url, sha256 = tk_checksum, strip_root = True)
(Although I'd recommend making the sha non-optional)
Let me know if this helps :)
I see. I was under impression that it all works automatically. My fault. Thank you very much
What is your question?
Hi. I have noticed that the SHA256 checksum is not working in my local builds. I build a package.. in conandata.yml there is an entry like this
it seems everything is correct, isn't it? Then the build says
and the build proceeds. What am I doing wrong? I do not know where to start. Any advice? Thanks
Have you read the CONTRIBUTING guide?