-
Notifications
You must be signed in to change notification settings - Fork 699
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
redownload pkgs when source hash verification fails #8500
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d6f62cd
redownload pkgs when source hash verification fails
gbaz 497a485
changelog
gbaz ed74eac
Merge branch 'master' into gb/verify-source-hashes
gbaz f282a0d
catch stray io errors reading index
gbaz fa113bd
Merge branch 'gb/verify-source-hashes' of github.com:haskell/cabal in…
gbaz 164d871
cleanup TODO
gbaz ff2cafe
Update changelog.d/pr-8500
gbaz 7e55a72
Merge branch 'master' into gb/verify-source-hashes
gbaz 5ce6c22
fix 9.4.2 build
gbaz 910a883
Merge branch 'master' into gb/verify-source-hashes
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
synopsis: Redownload pkgs when source hash verification fails | ||
packages: cabal-install | ||
prs: #8500 | ||
issues: #7541 | ||
|
||
description: { | ||
|
||
- Cabal-install will verify source hashes on cached downloads against the current index, and redownload on mismatch. (Which can occur with e.g. head.hackage) | ||
|
||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this error message triggered if
file
simply does not exist?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.
if it is, it's pretty urgent to fix, since it's causing a warning spam: #8571 (comment)
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.
Yes, this function
verifyFetchedTarball
is called only in one place in the code, for all elements ofrepoTarballPkgsWithMetadataUnvalidated
, which seems to contain ids of any packages that come from a secure repo, regardless of whether they were ever downloaded:https://github.com/haskell/cabal/pull/8500/files#diff-2adae381a2eb2d8c804d5396694a431e1e3babd816a5d2408a62213cf774a893R929-R935
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.
A solution would be to move the partitioning wrt if a package is already downloaded (the block containing
checkRepoTarballFetched
) earlier and apply it toallPkgLocations
instead ofrepoTarballPkgsWithoutMetadata
. Only packages that are already downloaded would then be checked forRepoSecure
and then verified. Does that make sense?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.
Or, better, avoiding some filesystem IO, partition
repoTarballPkgsWithMetadataUnvalidated
wrt if a package is already downloaded.