Bugfix: Correct checksum's sha256 when retrieve from remote#25831
Bugfix: Correct checksum's sha256 when retrieve from remote#25831alalazo merged 2 commits intospack:developfrom
Conversation
|
Don't have time to test this thoroughly at the moment, but if this fixes the issue that would be amazing. I think there may be many more issues with the same problem as #24971, it's a very commonly reported bug. |
I included the output in the description to show that this does fix #24971 . I checked other PRs (i.e., #24861) and this does not fix that problem. I still need to check #24668. |
Confirmed that this PR fixes the issue with #24668 so the |
|
@spackbot run pipeline |
|
I've started that pipeline for you! |
|
@mdorier @manuelakuhn Does this PR fix your issues? |
04aad20 to
97a7932
Compare
|
@tldahlgren if you have tested it with pmdk and it works, then yes it fixes it, since that's where I was having the issue. Thanks! |
|
@spackbot run pipeline |
|
I've started that pipeline for you! |
Checksum was only actually scraping when called with no versions. It now always scrapes and then selects URLs from the set of URLs known to exist whenever possible. fixes spack#25831
* lower priority of package-provided urls This change favors urls found in a scraped page over those provided by the package from `url_for_version`. In most cases this doesn't matter, but R specifically returns known bad URLs in some cases, and the fallback path for a failed fetch uses `fetch_remote_versions` to find a substitute. This fixes that problem. fixes #29204 * consider what links actually exist in all cases Checksum was only actually scraping when called with no versions. It now always scrapes and then selects URLs from the set of URLs known to exist whenever possible. fixes #25831 * bow to the wrath of flake8 * test-fetch urls from package, prefer if successful * Update lib/spack/spack/package.py Co-authored-by: Seth R. Johnson <johnsonsr@ornl.gov> * reword as suggested * re-enable mypy specific ignore and ignore pyflakes * remove flake8 ignore from .flake8 * address review comments * address comments * add sneaky missing substitute I missed this one because we call substitute on a URL that doesn't contain a version component. I'm not sure how that's supposed to work, but apparently it's required by at least one mock package, so back in it goes. Co-authored-by: Seth R. Johnson <johnsonsr@ornl.gov>
Fixes #24971
Fixes #24668
This PR ensures the proper URL when not given versions on the command line by using the URL associated/derived for versions listed in the package.
For example, the output without this fix is:
Using the change in this PR:
The differences for the overlapping versions (PR vs. without PR):
And the checksums listed in the package correspond to the versions with difference above, with or without this PR:
match the changes from this PR.