core: add a helpful long message for UnknownPackageError (#31996)

```
Error: Package 'armpl' not found.
```
is pretty useless after an upgrade unless you're a spack pro. I've
recently hit this on multiple machines. See
https://github.com/spack/spack/issues/31453 ,
https://github.com/spack/spack/issues/31489  .
This commit is contained in:
Seth R. Johnson 2022-08-10 05:01:07 -04:00 committed by GitHub
parent 13bcf82851
commit 5d6ab9a76c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1478,6 +1478,8 @@ def __init__(self, name, repo=None):
if name.endswith(".yaml"):
long_msg = "Did you mean to specify a filename with './{0}'?"
long_msg = long_msg.format(name)
else:
long_msg = "You may need to run 'spack clean -m'."
else:
msg = "Attempting to retrieve anonymous package."