From f2ddffb8400934d6b2e975d359be22c1997d6863 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Wed, 23 Oct 2019 16:50:51 -0700 Subject: 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 --- lib/spack/spack/util/web.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/spack/spack/util/web.py b/lib/spack/spack/util/web.py index e0a23fb444..abf549cc89 100644 --- a/lib/spack/spack/util/web.py +++ b/lib/spack/spack/util/web.py @@ -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') -- cgit v1.2.3-70-g09d2