diff --git a/lib/spack/spack/audit.py b/lib/spack/spack/audit.py index a93e151636e..68ed19602b2 100644 --- a/lib/spack/spack/audit.py +++ b/lib/spack/spack/audit.py @@ -350,7 +350,7 @@ def _ensure_no_folders_without_package_py(error_cls): for repository in spack.repo.PATH.repos: missing = [] for entry in os.scandir(repository.packages_path): - if not entry.is_dir(): + if not entry.is_dir() or entry.name == "__pycache__": continue package_py = pathlib.Path(entry.path) / spack.repo.package_file_name if not package_py.exists(): diff --git a/lib/spack/spack/repo.py b/lib/spack/spack/repo.py index 580d1ab2412..394aaf6b404 100644 --- a/lib/spack/spack/repo.py +++ b/lib/spack/spack/repo.py @@ -232,6 +232,8 @@ def get_all_package_diffs(type: str, repo: "Repo", rev1="HEAD^1", rev2="HEAD") - changed: Set[str] = set() for path in lines: dir_name, _, _ = path.partition("/") + if not nm.valid_module_name(dir_name, repo.package_api): + continue pkg_name = nm.pkg_dir_to_pkg_name(dir_name, repo.package_api) if pkg_name not in added and pkg_name not in removed: changed.add(pkg_name) diff --git a/var/spack/repos/spack_repo/builtin/__init__.py b/var/spack/repos/spack_repo/builtin/__init__.py new file mode 100644 index 00000000000..c4ecc87fb8a --- /dev/null +++ b/var/spack/repos/spack_repo/builtin/__init__.py @@ -0,0 +1,3 @@ +# Copyright Spack Project Developers. See COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) diff --git a/var/spack/repos/spack_repo/builtin/packages/__init__.py b/var/spack/repos/spack_repo/builtin/packages/__init__.py new file mode 100644 index 00000000000..c4ecc87fb8a --- /dev/null +++ b/var/spack/repos/spack_repo/builtin/packages/__init__.py @@ -0,0 +1,3 @@ +# Copyright Spack Project Developers. See COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT)