1 |
commit: 6bb4201548e378bb2001610726022de50c79e711 |
2 |
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Mar 18 15:03:54 2023 +0000 |
4 |
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 18 15:03:54 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=6bb42015 |
7 |
|
8 |
UnknownCategoryDirs: enable for overlays, ignore scripts dir |
9 |
|
10 |
Resolves: https://github.com/pkgcore/pkgcheck/issues/564 |
11 |
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> |
12 |
|
13 |
src/pkgcheck/checks/profiles.py | 17 +++++++++-------- |
14 |
1 file changed, 9 insertions(+), 8 deletions(-) |
15 |
|
16 |
diff --git a/src/pkgcheck/checks/profiles.py b/src/pkgcheck/checks/profiles.py |
17 |
index a0b8c618..5394dca7 100644 |
18 |
--- a/src/pkgcheck/checks/profiles.py |
19 |
+++ b/src/pkgcheck/checks/profiles.py |
20 |
@@ -536,7 +536,7 @@ class RepoProfilesCheck(RepoCheck): |
21 |
_source = (sources.EmptySource, (base.profiles_scope,)) |
22 |
required_addons = (addons.profiles.ProfileAddon,) |
23 |
known_results = frozenset( |
24 |
- [ |
25 |
+ { |
26 |
ArchesWithoutProfiles, |
27 |
UnusedProfileDirs, |
28 |
NonexistentProfilePath, |
29 |
@@ -548,11 +548,13 @@ class RepoProfilesCheck(RepoCheck): |
30 |
BannedProfileEapi, |
31 |
DeprecatedProfileEapi, |
32 |
ArchesOutOfSync, |
33 |
- ] |
34 |
+ } |
35 |
) |
36 |
|
37 |
# known profile status types for the gentoo repo |
38 |
- known_profile_statuses = frozenset(["stable", "dev", "exp"]) |
39 |
+ known_profile_statuses = frozenset({"stable", "dev", "exp"}) |
40 |
+ |
41 |
+ unknown_categories_whitelist = ("scripts",) |
42 |
|
43 |
def __init__(self, *args, profile_addon): |
44 |
super().__init__(*args) |
45 |
@@ -562,11 +564,10 @@ class RepoProfilesCheck(RepoCheck): |
46 |
self.non_profile_dirs = profile_addon.non_profile_dirs |
47 |
|
48 |
def finish(self): |
49 |
- if self.options.gentoo_repo: |
50 |
- if unknown_category_dirs := set(self.repo.category_dirs).difference( |
51 |
- self.repo.categories |
52 |
- ): |
53 |
- yield UnknownCategoryDirs(sorted(unknown_category_dirs)) |
54 |
+ if unknown_category_dirs := set(self.repo.category_dirs).difference( |
55 |
+ self.repo.categories, self.unknown_categories_whitelist |
56 |
+ ): |
57 |
+ yield UnknownCategoryDirs(sorted(unknown_category_dirs)) |
58 |
if nonexistent_categories := set(self.repo.config.categories).difference( |
59 |
self.repo.category_dirs |
60 |
): |