Uh oh!
There was an error while loading. Please reload this page.
ProhibitedStableKeywordsCheck: detect packages using prohibited stable keywords - #769
ProhibitedStableKeywordsCheck: detect packages using prohibited stable keywords#769falbrechtskirchinger wants to merge 1 commit into
Conversation
7342501 to
41bd9a7Compare
arthurzam
left a comment
There was a problem hiding this comment.
Please handle those comments. Sorry for long delay
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I've renamed the check to I've also added ignored categories ( Pending a final decision on the name, I will rename/regenerate the test data, rebase, and reword the commits. As I mentioned, the check is based on classDisallowedStableKeywordsCheck(OptionalCheck):
"""Scan for packages using stable keywords in repositories where they are not allowed."""known_results=frozenset({DisallowedStableKeywords})
# acct-group and acct-user eclasses define KEYWORDS# See https://bugs.gentoo.org/342185ignored_categories=frozenset({"acct-group", "acct-user"})
deffeed(self, pkg):
ifpkg.categoryinself.ignored_categories:
returnarches= {kforkinpkg.keywordsifnotk.startswith(('~', '-'))}
ifnotarches:
returnyieldDisallowedStableKeywords(arches, pkg=pkg)No addons, and no use of package restrictions. |
ferringb
left a comment
There was a problem hiding this comment.
This PR looks good to go from my standpoint, sans an english nitpick.
I'm guessing the PR got overlooked, but is there any issues from the other maintainers?
Uh oh!
There was an error while loading. Please reload this page.
falbrechtskirchinger
commented
Apr 2, 2026
Not quite done. @ferringb Could you (or anyone, really) please address my previous comment (specifically the simplified code snippet)? #769 (comment) Also, I'm still waiting on a final call regarding the name change. |
ferringb
commented
Apr 13, 2026
Pardon the lag, I've been buried. If you've got other PR's lagging, comment on them- in the coming week I plan to resume cleaning up the PR queue and ticketing for the pkgcore projects.
Prohibited, definitely. It's a statement of action, and for non-native speakers it avoids the negation. In the same vein, blacklist -> denylist or prohibited, whitelist -> allowlist or permitted, etc. Both to use modern norms and for linguistic reasons.
That version is better, and the pattern in general is better if you can surface the constant filtration restrictions to the class level. One minor tweak however, to be explicit to the type checker: Moving it to class level permits thus:
|
I took a run at tweaking this PR for merging it- basically just doing the rename (not the problem) and also fixing the lint issues blocking it from running. This actually is failing tests, even if all I'm doing is running ruff corrections: see https://github.com/ferringb/pkgcheck/actions/runs/24746961140/job/72400934662 . That error is stating- from what I know of it (that codepath is new to me)- that the check isn't actually registered. It's on my todo to refactor that registry into an actual derived registry, but I've not wrote that cleanup. This PR can't be merged since it's directly failing both local and GH tests. And I'm not seeing immediately why it fails tests. This strikes me as something very simple, but non obvious- something we should fix so it doesn't happen again- but again, I do not see why it's not finding the check in it's registry. To be clear, any caches on disk that may exist don't exist in the GH test run so that shouldn't be implicated. |
falbrechtskirchinger
commented
Apr 27, 2026
That is because the test names don't match the check name. Let me do the rename and incorporate your suggestions first. This should get the tests to pass (again), and you can polish it further from there. I'll try to get it done by the end of the week. |
1c150bf to
e6a363cCompareAdd an optional check to scan for packages using stable keywords prohibited by the repository. This is useful for overlays like GURU, which require that all packages use unstable keywords. Signed-off-by: Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com>
e6a363c to
5c7a70dComparefalbrechtskirchinger
commented
May 8, 2026
@ferringb Alright, sorry about the delay, I have:
The tests should once again pass. I believe I've addressed all comments, and you should be able to take it from here! |
Add an optional check to scan for packages using stable keywords. This is useful for overlays like
::guru, which require that all packages be keyworded unstable.The implementation is based on
UnstableOnlyCheck, though strictly copying the restrictions mechanism results inO(N * M), where a simple set intersection could beO(N).The severity was chosen based on the language in the regulations (rule 4): "Stable keywords must not be used." (emphasis mine)
Tests
expected.jsonandfix.patch.