Repository: spack/spack

Issue:
Installation issue: coreutils
coreutils package build failed.
It can be done in earlier spack version ( also coreutils@8.31 )

Error log:
```
$ spack install -v coreutils
==> 8159: Installing coreutils
==> Using cached archive: /home/xiaojun/spack/var/spack/cache/_source-cache/archive/ff/ff7a9c918edce6b4f4b2725e3f9b37b0c4d193531cac49a48b56c4d0d3a9e9fd.tar.xz
==> Staging archive: /tmp/root/spack-stage/spack-stage-coreutils-8.31-4c64dtxsmpap6qqootwwoaq4rlb6pmb4/coreutils-8.31.tar.xz
==> Created stage in /tmp/root/spack-stage/spack-stage-coreutils-8.31-4c64dtxsmpap6qqootwwoaq4rlb6pmb4
==> No patches needed for coreutils
==> 8159: coreutils: Building coreutils [AutotoolsPackage]
==> 8159: coreutils: Executing phase: 'autoreconf'
==> 8159: coreutils: Executing phase: 'configure'
==> Error: TypeError: 'NoneType' object is not iterable

/home/xiaojun/spack/lib/spack/spack/build_systems/autotools.py:294, in configure:
        291        and an appropriately set prefix.
        292        """
        293        options = getattr(self, 'configure_flag_args', [])
  >>    294        options += ['--prefix={0}'.format(prefix)]
        295        options += self.configure_args()
        296
        297        with working_dir(self.build_directory, create=True):

See build log for details:
  /tmp/root/spack-stage/spack-stage-coreutils-8.31-4c64dtxsmpap6qqootwwoaq4rlb6pmb4/spack-build-out.txt

==> Error: Failed to install coreutils due to ChildError: TypeError: 'NoneType' object is not iterable
/home/xiaojun/spack/lib/spack/spack/build_systems/autotools.py:294, in configure:
        291        and an appropriately set prefix.
        292        """
        293        options = getattr(self, 'configure_flag_args', [])
  >>    294        options += ['--prefix={0}'.format(prefix)]
        295        options += self.configure_args()
        296
        297        with working_dir(self.build_directory, create=True):

See build log for details:
  /tmp/root/spack-stage/spack-stage-coreutils-8.31-4c64dtxsmpap6qqootwwoaq4rlb6pmb4/spack-build-out.txt
Traceback (most recent call last):
  File "/home/xiaojun/spack/lib/spack/spack/build_environment.py", line 802, in child_process
    return_value = function()
  File "/home/xiaojun/spack/lib/spack/spack/installer.py", line 1113, in build_process
    phase(pkg.spec, pkg.prefix)
  File "/home/xiaojun/spack/lib/spack/spack/package.py", line 108, in phase_wrapper
    phase(spec, prefix)
  File "/home/xiaojun/spack/lib/spack/spack/build_systems/autotools.py", line 295, in configure
    options += self.configure_args()
TypeError: 'NoneType' object is not iterable
```


Discussion:

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/coreutils/package.py b/var/spack/repos/builtin/packages/coreutils/package.py
--- a/var/spack/repos/builtin/packages/coreutils/package.py
+++ b/var/spack/repos/builtin/packages/coreutils/package.py
@@ -35,4 +35,4 @@ def configure_args(self):
             configure_args.append('--without-gmp')
             configure_args.append('gl_cv_func_ftello_works=yes')
 
-            return configure_args
+        return configure_args


Test patch: