Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OutdatedBlocker: update from 2 years -> 4 years #724

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/pkgcheck/checks/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ def feed(self, pkg):


class OutdatedBlocker(results.VersionResult, results.Info):
"""Blocker dependency removed at least two years ago from the tree.
"""Blocker dependency removed at least four years ago from the tree.

Note that this ignores slot/subslot deps and USE deps in blocker atoms.
"""
Expand Down Expand Up @@ -1061,7 +1061,7 @@ def feed(self, pkg):
removal = max(x.time for x in matches)
removal = datetime.fromtimestamp(removal)
years = (self.today - removal).days / 365
if years >= 2:
if years >= 4:
outdated_blockers[attr].add((atom, round(years, 2)))
else:
nonexistent_blockers[attr].add(atom)
Expand Down
4 changes: 2 additions & 2 deletions tests/checks/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -1098,8 +1098,8 @@ def test_outdated_blockers(self):
self.init_check(future=days)
self.assertNoReport(self.check, self.source)

# blocker was removed at least 2 years ago
for days, years in ((730, 2), (1825, 5)):
# blocker was removed at least 4 years ago
for days, years in ((1460, 4), (1825, 5)):
self.init_check(future=days)
r = self.assertReport(self.check, self.source)
expected = metadata.OutdatedBlocker(
Expand Down
Loading