Repository: easybuilders/easybuild-easyblocks

Issue:
FSL-6.0.2 won't install with the current EasyBlock
Currently, the FSL EasyBlock tries to find the best matching template makefile from the ```self.fsldir/config``` directory. However, starting 6.0.2, FSL no longer ships template makefiles, but instead one single ```config/generic``` directory, where files need to be edited to 'configure' the installation.

**Proposed solution**

Everything related to copying the template config file as part of the ```configure_step``` should only occur ```if LooseVersion(self.version) < LooseVersion('6.0.2'):```

Thus, I'll put this line right before

```
if LooseVersion(self.version) >= LooseVersion('5.0.10'):
```

and increase the indentation for the following code block.


Discussion:

Resolving patch:
diff --git a/easybuild/easyblocks/f/fsl.py b/easybuild/easyblocks/f/fsl.py
--- a/easybuild/easyblocks/f/fsl.py
+++ b/easybuild/easyblocks/f/fsl.py
@@ -67,46 +67,51 @@ def configure_step(self):
 
         best_cfg = None
 
-        # Patch files for ver. < 5.0.10 patch multiple config directories
-        if LooseVersion(self.version) >= LooseVersion('5.0.10'):
-            # Check if a specific machine type directory is patched
-            systype_regex = re.compile("^diff.*config\/(.*(apple|gnu|i686|linux|spark)(?:(?!\/).)*)", re.M)
-
-            patched_cfgs = []
-
-            for patch in self.patches:
-                patchfile = read_file(patch['path'])
-                res = systype_regex.findall(patchfile)
-                patched_cfgs.extend([i[0] for i in res])
-
-            # Check that at least one config has been found
-            if patched_cfgs:
-                # Check that a single config has been patched
-                if len(nub(patched_cfgs)) == 1:
-                    best_cfg = patched_cfgs[0]
-                    self.log.debug("Found patched config dir: %s", best_cfg)
+        # Predefined makefiles for various configs have disappeared in v6.0.2.
+        # The next part of the EasyBlock has thereby become obsolete.
+        # See https://github.com/easybuilders/easybuild-easyblocks/issues/1859
+        if LooseVersion(self.version) < LooseVersion('6.0.2'):
+
+            # Patch files for ver. < 5.0.10 patch multiple config directories
+            if LooseVersion(self.version) >= LooseVersion('5.0.10'):
+                # Check if a specific machine type directory is patched
+                systype_regex = re.compile(r"^diff.*config\/(.*(apple|gnu|i686|linux|spark)(?:(?!\/).)*)", re.M)
+
+                patched_cfgs = []
+
+                for patch in self.patches:
+                    patchfile = read_file(patch['path'])
+                    res = systype_regex.findall(patchfile)
+                    patched_cfgs.extend([i[0] for i in res])
+
+                # Check that at least one config has been found
+                if patched_cfgs:
+                    # Check that a single config has been patched
+                    if len(nub(patched_cfgs)) == 1:
+                        best_cfg = patched_cfgs[0]
+                        self.log.debug("Found patched config dir: %s", best_cfg)
+                    else:
+                        raise EasyBuildError("Patch files are editing multiple config dirs: %s", patched_cfgs)
                 else:
-                    raise EasyBuildError("Patch files are editing multiple config dirs: %s", patched_cfgs)
-            else:
-                self.log.debug("No config dir found in patch files")
-
-        # If no patched config is found, pick best guess
-        cfgdir = os.path.join(self.fsldir, "config")
-        try:
-            if not best_cfg:
-                cfgs = os.listdir(cfgdir)
-                best_cfg = difflib.get_close_matches(fslmachtype, cfgs)[0]
-                self.log.debug("Best matching config dir for %s is %s" % (fslmachtype, best_cfg))
-        except OSError as err:
-            raise EasyBuildError("Unable to access configuration directory: %s", cfgdir, err)
-
-        # Prepare config
-        # Either use patched config or copy closest match
-        if fslmachtype != best_cfg:
-            srcdir = os.path.join(cfgdir, best_cfg)
-            tgtdir = os.path.join(cfgdir, fslmachtype)
-            copy_dir(srcdir, tgtdir)
-            self.log.debug("Copied %s to %s" % (srcdir, tgtdir))
+                    self.log.debug("No config dir found in patch files")
+
+            # If no patched config is found, pick best guess
+            cfgdir = os.path.join(self.fsldir, "config")
+            try:
+                if not best_cfg:
+                    cfgs = os.listdir(cfgdir)
+                    best_cfg = difflib.get_close_matches(fslmachtype, cfgs)[0]
+                    self.log.debug("Best matching config dir for %s is %s" % (fslmachtype, best_cfg))
+            except OSError as err:
+                raise EasyBuildError("Unable to access configuration directory: %s", cfgdir, err)
+
+            # Prepare config
+            # Either use patched config or copy closest match
+            if fslmachtype != best_cfg:
+                srcdir = os.path.join(cfgdir, best_cfg)
+                tgtdir = os.path.join(cfgdir, fslmachtype)
+                copy_dir(srcdir, tgtdir)
+                self.log.debug("Copied %s to %s" % (srcdir, tgtdir))
 
     def build_step(self):
         """Build FSL using supplied script."""


Test patch: