From 639156130b54a05b22b5e6338431b378ff8b5030 Mon Sep 17 00:00:00 2001
From: Peter Josef Scheibel <scheibel1@llnl.gov>
Date: Wed, 27 Nov 2019 14:04:45 -0800
Subject: [PATCH] Patch fetching: remove unnecessary argument

---
 lib/spack/spack/package.py    | 2 +-
 lib/spack/spack/patch.py      | 8 ++------
 lib/spack/spack/test/patch.py | 2 +-
 3 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index 38631c7a0e..26335ed2ff 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 9e29dcc638..73fdf4df25 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 c3df33dc8b..b705d01e42 100644
--- a/lib/spack/spack/test/patch.py
+++ b/lib/spack/spack/test/patch.py
@@ -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()
 
-- 
GitLab