aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Huber <echuber2@illinois.edu>2023-06-29 01:42:16 -0500
committerArthur Zamarin <arthurzam@gentoo.org>2023-06-30 23:08:44 +0300
commitb274e2aa89271710357abea944cddd1a1a331877 (patch)
tree46905b211aca937fd8de015a2dfa1d84bf33f338 /src
parentci: add pytest-github-actions-annotate-failures for test (diff)
downloadpkgcore-b274e2aa89271710357abea944cddd1a1a331877.tar.gz
pkgcore-b274e2aa89271710357abea944cddd1a1a331877.tar.bz2
pkgcore-b274e2aa89271710357abea944cddd1a1a331877.zip
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 <zhuyifei1999@gmail.com> Authored-by: Eric Huber <echuber2@illinois.edu> Closes: https://github.com/pkgcore/pkgcore/pull/406 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r--src/pkgcore/ebuild/repository.py12
1 files changed, 12 insertions, 0 deletions
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