spack/share/spack
Harmen Stoppels e055dc0e64
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.
2022-12-13 23:44:13 +01:00
..
bash Delocalize type output for bash completion (#30360) 2022-04-28 23:24:10 +00:00
bootstrap Update metadata for bootstrapping (#33665) 2022-11-03 09:05:03 +00:00
csh Update copyright year to 2022 2022-01-14 22:50:21 -08:00
docker Update Dockerfiles and images for Spack v0.18.0 (#30216) 2022-04-22 08:51:26 +02:00
docs/docker/module-file-tutorial Update copyright year to 2022 2022-01-14 22:50:21 -08:00
gitlab gitlab ci: more resources for paraview and py-torch (#34412) 2022-12-09 11:58:37 -07:00
keys update tutorial command for v0.18.0 and new gpg key (#30904) 2022-05-28 02:36:20 +00:00
logo
qa new command: spack pkg grep to search package files (#34388) 2022-12-09 10:07:54 -08:00
templates Bootstrap most of Spack dependencies using environments (#34029) 2022-12-06 11:54:02 +01:00
setup-env.csh Update copyright year to 2022 2022-01-14 22:50:21 -08:00
setup-env.fish Update copyright year to 2022 2022-01-14 22:50:21 -08:00
setup-env.ps1 refactor powershell setup to make it sourceable (#29987) 2022-04-20 17:11:44 -07:00
setup-env.sh Update copyright year to 2022 2022-01-14 22:50:21 -08:00
setup-tutorial-env.sh Update copyright year to 2022 2022-01-14 22:50:21 -08:00
spack-completion.bash Use file paths/urls correctly (#34452) 2022-12-13 23:44:13 +01:00