diff --git a/easybuild/easyblocks/generic/bundle.py b/easybuild/easyblocks/generic/bundle.py index 23da2338c2d..b8abecf8fc0 100644 --- a/easybuild/easyblocks/generic/bundle.py +++ b/easybuild/easyblocks/generic/bundle.py @@ -85,6 +85,10 @@ def __init__(self, *args, **kwargs): if self.cfg['patches']: raise EasyBuildError("List of patches for bundle itself must be empty, found %s", self.cfg['patches']) + # copy EasyConfig instance before we make changes to it + # (like adding component sources to top-level sources easyconfig parameter) + self.cfg = self.cfg.copy() + # disable templating to avoid premature resolving of template values self.cfg.enable_templating = False diff --git a/easybuild/easyblocks/generic/cargo.py b/easybuild/easyblocks/generic/cargo.py index c49e950969b..d03407862db 100644 --- a/easybuild/easyblocks/generic/cargo.py +++ b/easybuild/easyblocks/generic/cargo.py @@ -151,6 +151,9 @@ def __init__(self, *args, **kwargs): 'filename': self.crate_src_filename(crate, version), }) + # copy EasyConfig instance before we make changes to it + self.cfg = self.cfg.copy() + self.cfg.update('sources', sources) @property