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 (4096 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AD04615813A for ; Thu, 16 Jan 2025 12:17:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D5FCDE07E2; Thu, 16 Jan 2025 12:17:09 +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 B9FAFE07E2 for ; Thu, 16 Jan 2025 12:17:09 +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 B2F4A335D2B for ; Thu, 16 Jan 2025 12:17:08 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EDBC51F9A for ; Thu, 16 Jan 2025 12:17:06 +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: <1737025659.49c22943ba73c948023881452525420fe61210bf.arthurzam@gentoo> Subject: [gentoo-commits] proj/pkgcore/pkgcheck:master commit in: src/pkgcheck/checks/, tests/checks/ X-VCS-Repository: proj/pkgcore/pkgcheck X-VCS-Files: src/pkgcheck/checks/metadata.py tests/checks/test_metadata.py X-VCS-Directories: src/pkgcheck/checks/ tests/checks/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: 49c22943ba73c948023881452525420fe61210bf X-VCS-Branch: master Date: Thu, 16 Jan 2025 12:17:06 +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: 57579f87-b6ed-422e-8a36-19a6537f9cc2 X-Archives-Hash: 52ab6eb233f4bbfd35e964d03936ce21 commit: 49c22943ba73c948023881452525420fe61210bf Author: Sam James gentoo org> AuthorDate: Wed Jan 15 23:41:27 2025 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Thu Jan 16 11:07:39 2025 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=49c22943 OutdatedBlocker: update from 2 years -> 4 years 2 years is too aggressive IMHO. See de65ca7b4a3f3a68b65b56e2dcaf6e511d3a3443 for a recent example of this in ::gentoo but there's been plenty of such cases in #gentoo on IRC where we got users upgrading fine but they became unstuck by a removed blocker. Such blockers are really cheap and the purpose of the warning is really to remove ancient cruft rather than actually obstruct people upgrading systems where it's viable. Note that it's especially problematic because of the current behaviour of python-exec where emerge won't be able to resume if python-exec got updated but portage hasn't yet been rebuilt w/ new PYTHON_TARGETS. (... because if any interruption occurs, it can be fatal.) Bug: https://bugs.gentoo.org/916498 Signed-off-by: Sam James gentoo.org> src/pkgcheck/checks/metadata.py | 4 ++-- tests/checks/test_metadata.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pkgcheck/checks/metadata.py b/src/pkgcheck/checks/metadata.py index 3c3b4bf9..c81c5b09 100644 --- a/src/pkgcheck/checks/metadata.py +++ b/src/pkgcheck/checks/metadata.py @@ -995,7 +995,7 @@ class DependencyCheck(Check): 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. """ @@ -1061,7 +1061,7 @@ class OutdatedBlockersCheck(Check): 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) diff --git a/tests/checks/test_metadata.py b/tests/checks/test_metadata.py index be5ae182..55825307 100644 --- a/tests/checks/test_metadata.py +++ b/tests/checks/test_metadata.py @@ -1098,8 +1098,8 @@ class TestOutdatedBlockersCheck(misc.ReportTestCase): 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(