Skip to content

Commit 5d7623c

Browse files
committed
Extend patch search logic to components
1 parent 0653e2d commit 5d7623c

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

easybuild/tools/github.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import getpass
3535
import glob
3636
import functools
37+
import itertools
3738
import os
3839
import random
3940
import re
@@ -1013,11 +1014,13 @@ def is_patch_for(patch_name, ec):
10131014

10141015
patches = copy.copy(ec['patches'])
10151016

1016-
for ext in ec.get_ref('exts_list'):
1017-
if isinstance(ext, (list, tuple)) and len(ext) == 3 and isinstance(ext[2], dict):
1018-
templates = {'name': ext[0], 'version': ext[1]}
1019-
ext_options = ext[2]
1020-
patches.extend(p % templates for p in ext_options.get('patches', []))
1017+
with ec.disable_templating():
1018+
for ext in itertools.chain(ec['exts_list'], ec.get('components', [])):
1019+
if isinstance(ext, (list, tuple)) and len(ext) == 3 and isinstance(ext[2], dict):
1020+
templates = {'name': ext[0], 'version': ext[1]}
1021+
ext_options = ext[2]
1022+
patches.extend(p[0] % templates if isinstance(p, (tuple, list)) else p % templates
1023+
for p in ext_options.get('patches', []))
10211024

10221025
for patch in patches:
10231026
if isinstance(patch, (tuple, list)):

0 commit comments

Comments
 (0)