Skip to content

Commit fe3be82

Browse files
committed
only store paths to patches
1 parent 01be90f commit fe3be82

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

easybuild/framework/easyblock.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
import easybuild.tools.environment as env
6868
import easybuild.tools.toolchain as toolchain
6969
from easybuild.base import fancylogger
70-
from easybuild.base.frozendict import FrozenDict
7170
from easybuild.framework.easyconfig import EASYCONFIGS_PKG_SUBDIR
7271
from easybuild.framework.easyconfig.easyconfig import ITERATE_OPTIONS, EasyConfig, ActiveMNS, get_easyblock_class
7372
from easybuild.framework.easyconfig.easyconfig import get_module_path, letter_dir_for, resolve_template
@@ -189,7 +188,7 @@ def __init__(self, ec, logfile=None):
189188

190189
# list of patch/source files, along with checksums
191190
self.patches = []
192-
self.all_patches = set() # set of all patches (including patches of extensions)
191+
self.all_patches_paths = set() # set of paths to all patches (including patches of extensions)
193192
self.src = []
194193
self.data_src = []
195194
self.checksums = []
@@ -603,7 +602,7 @@ def fetch_patches(self, patch_specs=None, extension=False, checksums=None):
603602
patch_info['path'] = path
604603
patch_info['checksum'] = self.get_checksum_for(checksums, filename=patch_info['name'], index=index)
605604

606-
self.all_patches.add(FrozenDict(patch_info))
605+
self.all_patches_paths.add(path)
607606
if extension:
608607
patches.append(patch_info)
609608
else:
@@ -5129,9 +5128,8 @@ def ensure_writable_log_dir(log_dir):
51295128
block = det_full_ec_version(app.cfg) + ".block"
51305129
repo.add_easyconfig(ecdict['original_spec'], app.name, block, buildstats, currentbuildstats)
51315130
repo.add_easyconfig(spec, app.name, det_full_ec_version(app.cfg), buildstats, currentbuildstats)
5132-
for patch in app.all_patches:
5133-
if 'path' in patch:
5134-
repo.add_patch(patch['path'], app.name)
5131+
for patch_path in app.all_patches_paths:
5132+
repo.add_patch(patch_path, app.name)
51355133
repo.commit("Built %s" % app.full_mod_name)
51365134
del repo
51375135
except EasyBuildError as err:
@@ -5153,11 +5151,10 @@ def ensure_writable_log_dir(log_dir):
51535151
_log.debug("Copied easyconfig file %s to %s", spec, newspec)
51545152

51555153
# copy patches
5156-
for patch in app.all_patches:
5157-
if 'path' in patch:
5158-
target = os.path.join(new_log_dir, os.path.basename(patch['path']))
5159-
copy_file(patch['path'], target)
5160-
_log.debug("Copied patch %s to %s", patch['path'], target)
5154+
for patch_path in app.all_patches_paths:
5155+
target = os.path.join(new_log_dir, os.path.basename(patch_path))
5156+
copy_file(patch_path, target)
5157+
_log.debug("Copied patch %s to %s", patch_path, target)
51615158

51625159
if build_option('read_only_installdir') and not app.cfg['stop']:
51635160
# take away user write permissions (again)

0 commit comments

Comments
 (0)