Regenerate views when specs already installed (#28113)

With this commit:
```
$ spack env activate --temp
$ spack install zlib
==> All of the packages are already installed
==> Updating view at /tmp/spack-faiirgmt/.spack-env/view
$ spack install zlib
==> All of the packages are already installed
```

Before this PR:
```
$ spack env activate --temp
$ spack install zlib
==> All of the packages are already installed
$ spack install zlib
==> All of the packages are already installed
```

No view was generated
This commit is contained in:
Harmen Stoppels 2021-12-21 18:41:12 +01:00 committed by Massimiliano Culpo
parent 87abda4cdd
commit 5daf023aec

View file

@ -1500,10 +1500,8 @@ def install_specs(self, specs=None, **install_args):
if not specs_to_install:
tty.msg('All of the packages are already installed')
return
tty.debug('Processing {0} uninstalled specs'.format(
len(specs_to_install)))
else:
tty.debug('Processing {0} uninstalled specs'.format(len(specs_to_install)))
install_args['overwrite'] = install_args.get(
'overwrite', []) + self._get_overwrite_specs()