Patch fetching: remove unnecessary argument

This commit is contained in:
Peter Josef Scheibel 2019-11-27 14:04:45 -08:00 committed by Todd Gamblin
parent 587c650b88
commit 639156130b
No known key found for this signature in database
GPG key ID: 66B24B9050FDD0B8
3 changed files with 4 additions and 8 deletions

View file

@ -1086,7 +1086,7 @@ def do_fetch(self, mirror_only=False):
self.stage.cache_local()
for patch in self.spec.patches:
patch.fetch(self.stage)
patch.fetch()
if patch.cache():
patch.cache().cache_local()

View file

@ -64,11 +64,8 @@ def __init__(self, pkg, path_or_url, level, working_dir):
self.level = level
self.working_dir = working_dir
def fetch(self, stage):
def fetch(self):
"""Fetch the patch in case of a UrlPatch
Args:
stage: stage for the package that needs to be patched
"""
def clean(self):
@ -185,8 +182,7 @@ def __init__(self, pkg, url, level=1, working_dir='.', ordering_key=None,
if not self.sha256:
raise PatchDirectiveError("URL patches require a sha256 checksum")
# TODO: this function doesn't use the stage arg
def fetch(self, stage):
def fetch(self):
"""Retrieve the patch in a temporary stage and compute self.path
Args:

View file

@ -79,7 +79,7 @@ def test_url_patch(mock_patch_stage, filename, sha256, archive_sha256):
third line
""")
# apply the patch and compare files
patch.fetch(stage)
patch.fetch()
patch.apply(stage)
patch.clean()