diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 38631c7a0e2ddd3ead82fe9b0d648a7580bdcaa3..26335ed2ff6b499d4d6cc2e3b1f1949372837727 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -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() diff --git a/lib/spack/spack/patch.py b/lib/spack/spack/patch.py index 9e29dcc638659a7cfb58ff7726ac13ba43a2103a..73fdf4df25f4e96d155b7fe1fd5ea78c4b59ddfc 100644 --- a/lib/spack/spack/patch.py +++ b/lib/spack/spack/patch.py @@ -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: diff --git a/lib/spack/spack/test/patch.py b/lib/spack/spack/test/patch.py index aae0687ec134e8cd1057b3356845cdc7fd5ccacb..5a4b6dba34c411033cfd9d4bd52a119418b3f710 100644 --- a/lib/spack/spack/test/patch.py +++ b/lib/spack/spack/test/patch.py @@ -80,7 +80,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()