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 GitHub
parent 389beaef97
commit db69a291d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1515,10 +1515,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)))
specs_to_overwrite = self._get_overwrite_specs()
tty.debug('{0} specs need to be overwritten'.format(