bugfix: web.push_to_url should not format the local path that is passed to it (#13408)
fd58c98
formats the `Stage`'s `archive_path` in `Stage.archive` (as part of `web.push_to_url`). This is not needed and if the formatted differs from the original path (for example if the archive file name contains a URL query suffix), then the copy fails.
This removes the formatting that occurs in `web.push_to_url`.
We should figure out a way to handle bad cases like this *and* to have nicer filenames for downloaded files. One option that would work in this particular case would be to also pass `-J` / `--remote-header-name` to `curl`. We'll need to do follow-up work to determine if we can use `-J` everywhere.
See also: https://github.com/spack/spack/pull/11117#discussion_r338301058
This commit is contained in:
parent
bd7265ed52
commit
f2ddffb840
@ -203,14 +203,9 @@ def warn_no_ssl_cert_checking():
|
||||
"your Python to enable certificate verification.")
|
||||
|
||||
|
||||
def push_to_url(local_path, remote_path, **kwargs):
|
||||
def push_to_url(local_file_path, remote_path, **kwargs):
|
||||
keep_original = kwargs.get('keep_original', True)
|
||||
|
||||
local_url = url_util.parse(local_path)
|
||||
local_file_path = url_util.local_file_path(local_url)
|
||||
if local_file_path is None:
|
||||
raise ValueError('local path must be a file:// url')
|
||||
|
||||
remote_url = url_util.parse(remote_path)
|
||||
verify_ssl = spack.config.get('config:verify_ssl')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user