diff --git a/lib/spack/spack/repo.py b/lib/spack/spack/repo.py index 1882645f85..a4362d9d31 100644 --- a/lib/spack/spack/repo.py +++ b/lib/spack/spack/repo.py @@ -387,7 +387,7 @@ def _create_new_cache(self) -> Dict[str, os.stat_result]: # Warn about invalid names that look like packages. if not nm.valid_module_name(pkg_name): - if not pkg_name.startswith("."): + if not pkg_name.startswith(".") and pkg_name != "repo.yaml": tty.warn( 'Skipping package at {0}. "{1}" is not ' "a valid Spack module name.".format(pkg_dir, pkg_name)