ensure that $EBEXTSLIST* is also included in generated module under --module-only#2112
Conversation
Rather than using the filtered list of extensions built up during installation, use the full list from the easyconfig. Using the filtered list breaks when adding extensions and with `--module-only`.
| footer.append(self.make_module_extra_extensions()) | ||
| extensions = self.cfg['exts_list'] | ||
| if extensions: | ||
| footer.append(self.make_module_extra_extensions(extensions)) |
There was a problem hiding this comment.
hmm, there's little point in passing down self.cfg['exts_list'] here, since self.make_module_extra_extensions also has access to it?
| if self.cfg['exts_list']: | ||
| footer.append(self.make_module_extra_extensions()) | ||
| extensions = self.cfg['exts_list'] | ||
| if extensions: |
There was a problem hiding this comment.
it should be fine to just drop this condition imho... with self.exts_all we had to be more careful since the default value was None, but self.cfg['exts_list'] is an empty list by default so it's fine to always iterate over it
There was a problem hiding this comment.
Nope. We will generate an empty env var in this case...
| exts_list = ','.join(['%s-%s' % (ext['name'], ext.get('version', '')) for ext in self.exts_all]) | ||
| env_var_name = convert_name(self.name, upper=True) | ||
| lines.append(self.module_generator.set_environment('EBEXTSLIST%s' % env_var_name, exts_list)) | ||
| exts_list = ','.join(['%s-%s' % (ext[0], ext[1]) for ext in extensions]) |
There was a problem hiding this comment.
just use self.cfg['exts_list'] here rather than passing it down extensions
| @@ -1054,10 +1054,9 @@ def make_module_extra_extensions(self): | |||
| lines = [self.module_extra_extensions] | |||
There was a problem hiding this comment.
Is this still needed now that we use self.cfg['exts_list']?
There was a problem hiding this comment.
Yes, this is extra stuff that can go into the module file that is specific to a particular extension, which is returned by the run method.
This is still broken now, since every call to run is being skipped under --module-only...
It's possible to fix this, but that's orthogonal to this fix imho. I'll mention this in #1877, which is sort of a tracking issue for problems with --module-only
check presence of definition for $EBEXTSLIST in exts_list test
Rather than using the filtered list of extensions built up during installation, use the full list from the easyconfig. Using the filtered list breaks when adding extensions and with
--module-only.