From b274e2aa89271710357abea944cddd1a1a331877 Mon Sep 17 00:00:00 2001 From: Eric Huber Date: Thu, 29 Jun 2023 01:42:16 -0500 Subject: manifest: fix missing errors when all ebuilds for package are masked bad If all of a package's ebuild files have been masked bad, that package gets filtered out of the iterator for the previous loop in this function, so a followup loop over the masked bad packages can help to emit the unreported errors. Resolves: https://github.com/pkgcore/pkgdev/issues/55 Co-authored-by: YiFei Zhu Authored-by: Eric Huber Closes: https://github.com/pkgcore/pkgcore/pull/406 Signed-off-by: Arthur Zamarin --- src/pkgcore/ebuild/repository.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/pkgcore/ebuild/repository.py b/src/pkgcore/ebuild/repository.py index 800e6e5dd..164aa0c97 100644 --- a/src/pkgcore/ebuild/repository.py +++ b/src/pkgcore/ebuild/repository.py @@ -161,6 +161,18 @@ class repo_operations(_repo_ops.operations): observer.info(f"generating manifest: {key}::{self.repo.repo_id}") manifest.update(sorted(all_fetchables.values()), chfs=write_chksums) + # edge case: If all ebuilds for a package were masked bad, + # then it was filtered out of the iterator for the above loop, + # so we handle unreported bad packages here. + missed_bad_set = set() + for pkg in self.repo._bad_masked: + if pkg.key not in ret: + observer.error( + f"{pkg.cpvstr}: {pkg.data.msg(verbosity=observer.verbosity)}" + ) + missed_bad_set.add(pkg.key) + ret.update(missed_bad_set) + return ret -- cgit v1.2.3-65-gdbad