Skip to content

Commit

Permalink
Extend patch search logic to components
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Aug 17, 2021
1 parent 0653e2d commit 5d7623c
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions easybuild/tools/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import getpass
import glob
import functools
import itertools
import os
import random
import re
Expand Down Expand Up @@ -1013,11 +1014,13 @@ def is_patch_for(patch_name, ec):

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

for ext in ec.get_ref('exts_list'):
if isinstance(ext, (list, tuple)) and len(ext) == 3 and isinstance(ext[2], dict):
templates = {'name': ext[0], 'version': ext[1]}
ext_options = ext[2]
patches.extend(p % templates for p in ext_options.get('patches', []))
with ec.disable_templating():
for ext in itertools.chain(ec['exts_list'], ec.get('components', [])):
if isinstance(ext, (list, tuple)) and len(ext) == 3 and isinstance(ext[2], dict):
templates = {'name': ext[0], 'version': ext[1]}
ext_options = ext[2]
patches.extend(p[0] % templates if isinstance(p, (tuple, list)) else p % templates
for p in ext_options.get('patches', []))

for patch in patches:
if isinstance(patch, (tuple, list)):
Expand Down

0 comments on commit 5d7623c

Please sign in to comment.