From 5d6ab9a76c75a5f260d92b592d55ed5a424e0d09 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Wed, 10 Aug 2022 05:01:07 -0400 Subject: 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 . --- lib/spack/spack/repo.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/spack/spack/repo.py b/lib/spack/spack/repo.py index 11a4e14416..814f84049a 100644 --- a/lib/spack/spack/repo.py +++ b/lib/spack/spack/repo.py @@ -1478,6 +1478,8 @@ class UnknownPackageError(UnknownEntityError): 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." -- cgit v1.2.3-60-g2f50