From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 46C1815800F for ; Fri, 20 Jan 2023 15:01:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 75AC4E086D; Fri, 20 Jan 2023 15:01:53 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 540E4E084A for ; Fri, 20 Jan 2023 15:01:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 37F6A33BF41 for ; Fri, 20 Jan 2023 15:01:52 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6CBC5738 for ; Fri, 20 Jan 2023 15:01:50 +0000 (UTC) From: "Arthur Zamarin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arthur Zamarin" Message-ID: <1674226795.c81bc6cde6a37c9f590a5f9a42346fe1f5fd220e.arthurzam@gentoo> Subject: [gentoo-commits] proj/pkgcore/pkgcheck:master commit in: src/pkgcheck/checks/ X-VCS-Repository: proj/pkgcore/pkgcheck X-VCS-Files: src/pkgcheck/checks/repo.py X-VCS-Directories: src/pkgcheck/checks/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: c81bc6cde6a37c9f590a5f9a42346fe1f5fd220e X-VCS-Branch: master Date: Fri, 20 Jan 2023 15:01:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 8e3e830d-1a80-43ef-8342-383a27c605f4 X-Archives-Hash: 486ec7ce275340f2638d20cf931f59a9 commit: c81bc6cde6a37c9f590a5f9a42346fe1f5fd220e Author: Arthur Zamarin gentoo org> AuthorDate: Fri Jan 20 14:59:55 2023 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Fri Jan 20 14:59:55 2023 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=c81bc6cd EmptyDirsCheck: mark results' level as error This check is done at repo level, so if you are inside a package dir, it will be skipped. As a solution, mark those results as errors, so the bot will fail to regen metadata and we can notice the issue. Resolves: https://github.com/pkgcore/pkgcheck/issues/499 Signed-off-by: Arthur Zamarin gentoo.org> src/pkgcheck/checks/repo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pkgcheck/checks/repo.py b/src/pkgcheck/checks/repo.py index 8b12f68d..eefc523e 100644 --- a/src/pkgcheck/checks/repo.py +++ b/src/pkgcheck/checks/repo.py @@ -50,7 +50,7 @@ class RepoDirCheck(GentooRepoCheck, RepoCheck): yield BinaryFile(rel_path) -class EmptyCategoryDir(results.CategoryResult, results.Warning): +class EmptyCategoryDir(results.CategoryResult, results.Error): """Empty category directory in the repository.""" scope = base.repo_scope @@ -60,7 +60,7 @@ class EmptyCategoryDir(results.CategoryResult, results.Warning): return f"empty category directory: {self.category}" -class EmptyPackageDir(results.PackageResult, results.Warning): +class EmptyPackageDir(results.PackageResult, results.Error): """Empty package directory in the repository.""" scope = base.repo_scope @@ -74,7 +74,7 @@ class EmptyDirsCheck(GentooRepoCheck, RepoCheck): """Scan for empty category or package directories.""" _source = (sources.EmptySource, (base.repo_scope,)) - known_results = frozenset([EmptyCategoryDir, EmptyPackageDir]) + known_results = frozenset({EmptyCategoryDir, EmptyPackageDir}) def __init__(self, *args): super().__init__(*args)