summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Josef Scheibel <scheibel1@llnl.gov>2019-11-27 14:04:45 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2019-12-23 23:03:10 -0800
commit639156130b54a05b22b5e6338431b378ff8b5030 (patch)
treea6487ad052faa7b34a855c1cc6e9cb522070181d
parent587c650b8891ff1a633d4ccfcfcae74e079b1c8d (diff)
downloadspack-639156130b54a05b22b5e6338431b378ff8b5030.tar.gz
spack-639156130b54a05b22b5e6338431b378ff8b5030.tar.bz2
spack-639156130b54a05b22b5e6338431b378ff8b5030.tar.xz
spack-639156130b54a05b22b5e6338431b378ff8b5030.zip
Patch fetching: remove unnecessary argument
-rw-r--r--lib/spack/spack/package.py2
-rw-r--r--lib/spack/spack/patch.py8
-rw-r--r--lib/spack/spack/test/patch.py2
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 @@ class PackageBase(with_metaclass(PackageMeta, PackageViewMixin, object)):
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 @@ class Patch(object):
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 @@ class UrlPatch(Patch):
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 @@ first line
third line
""")
# apply the patch and compare files
- patch.fetch(stage)
+ patch.fetch()
patch.apply(stage)
patch.clean()