-
Notifications
You must be signed in to change notification settings - Fork 359
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
Add every listed checksums of a given archive to the cache when fetching from it #6068
Add every listed checksums of a given archive to the cache when fetching from it #6068
Conversation
f2c5d5b
to
22226af
Compare
22226af
to
e5a8faf
Compare
e5a8faf
to
6db7232
Compare
d6ec8ef
to
308a5fd
Compare
66b4821
to
d152299
Compare
I've updated
|
tests/reftests/admin-cache.unix.test
Outdated
msg="$pkg : $kind :" | ||
|
||
if [ -L $arch ]; then | ||
link=`readlink "$arch"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if readlink is portable enough. I need here to retrieve the target of the link, not the fully resolved one
d152299
to
77d6516
Compare
0622d17
to
828846e
Compare
there is a regression in extrasource --- a/_build/default/tests/reftests/extrasource.test
+++ b/_build/default/tests/reftests/extrasource.out
@@ -1177,16 +1177,12 @@ The following actions will be performed:
- install good-sha256-good-md5 1
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-[ERROR] Conflicting file hashes, or broken or compromised cache!
- - sha256=hash (MISMATCH)
- - md5=hash (MISMATCH)
-
--> retrieved good-sha256-good-md5.1 (file://${BASEDIR}/p.patch)
+-> retrieved good-sha256-good-md5.1 (cached)
-> installed good-sha256-good-md5.1
Done.
### sh check-cache.sh
-MD5: link, to sha256 patch
-SHA256: patch, with matching checksum
+MD5: patch, with matching checksum
+SHA256: patch, with mismatching checksum |
i don't think this is a regression. Only a change of behaviour stemming from the fact that now the chosen file from the cache is the last one in the list instead of the first one. We can keep the old behaviour but it requires more code. I don't think it's broken per-say. |
49f93d0
to
0860d25
Compare
b192cc6
to
11bb01a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pull_file_to_cache
need an update doc as it no more a no op if the file exists and there is no links.- update of test (full reproducibility depends on admin hashes cache: move under opam root #6103)
Otherwise, lgtm!
List.iter (fun x -> | ||
OpamFilename.link ~relative:true ~target ~link:(f x)) | ||
l |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OpamSystem.link
removes the existing link to create a new one. Do we want that behaviour or check beforehand here if the symlink checksum -> target exists, otherwise create it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we should do this separately in OpamSystem.link
directly. I've opened #6113 to track this
11bb01a
to
43df06b
Compare
both done |
43df06b
to
648eaa9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Fixes #6064
Backported in 2.2 by #6069