Ignore GPG/PGP signatures/checksums when finding available downloads#2028
Merged
tgamblin merged 2 commits intospack:developfrom Oct 16, 2016
Merged
Ignore GPG/PGP signatures/checksums when finding available downloads#2028tgamblin merged 2 commits intospack:developfrom
tgamblin merged 2 commits intospack:developfrom
Conversation
Member
Author
|
By the way, this is probably something we should add a test for in the unit tests. I would create a directory with files like: and make sure that only one version is found. Unfortunately, I don't really know how to write unit tests yet, but if you give me tips I can give it a shot. |
alalazo
approved these changes
Oct 16, 2016
paulhopkins
pushed a commit
to paulhopkins/spack
that referenced
this pull request
Oct 24, 2016
…pack#2028) * Ignore GPG/PGP signatures/checksums when finding available downloads * Remove duplicated basename
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #282.
Previously, Spack was picking up GPG/PGP signatures/checksums when finding available downloads. This affected
spack versions:It affected
spack checksum:And most annoyingly, it affected
spack create:This would result in a
package.pythat looks like:The following keys were erroneously being picked up:
Most would show up as
1.2.3.tar.gz.sig, although keys like.md5and.sha256would show up as versions5and256. By my count, this bug affected 155 out of 998 packages (15%).This PR adds a
$anchor to the end of the url regex. Unfortunately, SourceForge downloads end in1.2.3.tar.gz/download, so I had to allow that as well.I tested these changes by diffing the output of the following script before and after the change:
The result is that all 155 packages have now been corrected. I only found 2 cases where the changes negatively improved version finding abilities (
paraviewandqhullboth found 1 fewer version). Aside from that, I think it's an overwhelming success!I tested
spack versionson every package, but I only testedspack checksum,spack create, andspack fetchon a couple packages, so feel free to test it out yourself. Let me know if you want me to provide the before and after results from the script above.