diff options
author | Erik Schnetter <schnetter@gmail.com> | 2022-04-05 21:45:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-05 18:45:45 -0700 |
commit | 69b3a88fa325a58dcea860fe92fa3910c8609a0c (patch) | |
tree | 67fa6ac790dfc422be3e9ec4b5a12b5391a8706c | |
parent | 6a3c0825e328674e8f545f58643b1e22e6769a1c (diff) | |
download | spack-69b3a88fa325a58dcea860fe92fa3910c8609a0c.tar.gz spack-69b3a88fa325a58dcea860fe92fa3910c8609a0c.tar.bz2 spack-69b3a88fa325a58dcea860fe92fa3910c8609a0c.tar.xz spack-69b3a88fa325a58dcea860fe92fa3910c8609a0c.zip |
Bugfix: CVS fetching (#29793)
#27021 broke fetching for CVS-based packages because:
- The mirror logic was using URL parsing to extract a path from the
CVS repository location
- #27021 added sanity checks to enforce that strings passed to the
URL parser were actually URLs
This replaces the call to "url_util.parse" with logic that is
customized for CVS. This implies that VCSFetchStrategy should
rename the "url_attr" attribute to something more generic, but
that should be handled separately.
-rw-r--r-- | lib/spack/spack/fetch_strategy.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py index 44933f62a2..834a408443 100644 --- a/lib/spack/spack/fetch_strategy.py +++ b/lib/spack/spack/fetch_strategy.py @@ -1104,8 +1104,13 @@ class CvsFetchStrategy(VCSFetchStrategy): if not (self.branch or self.date): # We need a branch or a date to make a checkout reproducible return None - repo_path = url_util.parse(self.url).path - result = os.path.sep.join(['cvs', repo_path]) + # Special-case handling because this is not actually a URL + elements = self.url.split(':') + final = elements[-1] + elements = final.split('/') + # Everything before the first slash is a port number + elements = elements[1:] + result = os.path.sep.join(['cvs'] + elements) if self.branch: result += '%branch=' + self.branch if self.date: |