New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] conan tries to extract broken downloads #8578
Comments
I would definitely consider this a bug. |
Hi @blackliner Yes, this is a bit surprising. The implementation already contains a checksum: with self._lock(h):
cached_path = os.path.join(self._cache_folder, h)
if not os.path.exists(cached_path):
self._file_downloader.download(url=url, file_path=cached_path, md5=md5,
sha1=sha1, sha256=sha256, **kwargs)
else:
# specific check for corrupted cached files, will raise, but do nothing more
# user can report it or "rm -rf cache_folder/path/to/file"
try:
check_checksum(cached_path, md5, sha1, sha256)
except ConanException as e:
raise ConanException("%s\nCached downloaded file corrupted: %s"
% (str(e), cached_path)) The |
@memsharded any updates on this issue? Is it scheduled to be fixed? I added some print, and it looks like the method is called without any
There is a note in that same file (
|
Hi @blackliner Yes, I have realized too that when using revisions, the checksum is simply not there for Conan cached artifacts, as it relies on the revision. I am working on a fix using the "dirty" functionality we are using in other places. |
Fixed in #8664, will be released in 1.35 |
When
CTRL + C
while conan downloads the prebuilt archives of a package, the subsequent execution ofconan install
tries to extract from those half-downloaded archives from thedownload_cache
. This does ONLY happens when you use adownload_cache
.2 possible ideas:
Environment Details (include every applicable attribute)
relevant conan settings:
download_cache = /tmp/conan_download_cache
Steps to reproduce (Include if Applicable)
Its easy to replicate with a "big" package, maybe something like opencv, that is available as prebuilt on the remote of your choice. If not, use your own conan repo, build and upload your package.
conan install opencv/4.5.0@
and hitCTRL + C
when conan says:Downloading 834c114e736468c70cf2b5d0781c6c8db5787764b30d718ac40d45e51ec34c0d: 23%|##2 | 2.64M/11.7M
conan install opencv/4.5.0@
and see:The text was updated successfully, but these errors were encountered: