summaryrefslogtreecommitdiff
path: root/LICENSE-MIT
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2022-12-13 23:44:13 +0100
committerGitHub <noreply@github.com>2022-12-13 23:44:13 +0100
commite055dc0e64693782e5d98ffa90780ad57c855aa2 (patch)
tree3505126818c99daa59f9daa4330af2d8cd30f941 /LICENSE-MIT
parentc45729cba17ce85198ce72aef04bf0cf933917fb (diff)
downloadspack-e055dc0e64693782e5d98ffa90780ad57c855aa2.tar.gz
spack-e055dc0e64693782e5d98ffa90780ad57c855aa2.tar.bz2
spack-e055dc0e64693782e5d98ffa90780ad57c855aa2.tar.xz
spack-e055dc0e64693782e5d98ffa90780ad57c855aa2.zip
Use file paths/urls correctly (#34452)
The main issue that's fixed is that Spack passes paths (as strings) to functions that require urls. That wasn't an issue on unix, since there you can simply concatenate `file://` and `path` and all is good, but on Windows that gives invalid file urls. Also on Unix, Spack would not deal with uri encoding like x%20y for file paths. It also removes Spack's custom url.parse function, which had its own incorrect interpretation of file urls, taking file://x/y to mean the relative path x/y instead of hostname=x and path=/y. Also it automatically interpolated variables, which is surprising for a function that parses URLs. Instead of all sorts of ad-hoc `if windows: fix_broken_file_url` this PR adds two helper functions around Python's own path2url and reverse. Also fixes a bug where some `spack buildcache` commands used `-d` as a flag to mean `--mirror-url` requiring a URL, and others `--directory`, requiring a path. It is now the latter consistently.
Diffstat (limited to 'LICENSE-MIT')
0 files changed, 0 insertions, 0 deletions