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.
This commit is contained in:
@@ -1104,8 +1104,13 @@ def mirror_id(self):
|
||||
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:
|
||||
|
Reference in New Issue
Block a user