From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9646E1581EE for ; Wed, 09 Apr 2025 18:02:03 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 8192C3433FA for ; Wed, 09 Apr 2025 18:02:03 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 909A01104C8; Wed, 09 Apr 2025 18:02:01 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 882AC1104C8 for ; Wed, 09 Apr 2025 18:02:01 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3FEE53433E1 for ; Wed, 09 Apr 2025 18:02:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C5EA31379 for ; Wed, 09 Apr 2025 18:01:59 +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: <1744221690.c8c1d3a1339ab5e575d330dbc248ffd59c8907e2.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_metadata.py X-VCS-Directories: src/pkgcheck/checks/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: c8c1d3a1339ab5e575d330dbc248ffd59c8907e2 X-VCS-Branch: master Date: Wed, 09 Apr 2025 18:01:59 +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: ee4684fe-2aea-4e42-b432-af1428bfed12 X-Archives-Hash: cbe8adf896b3cc1b0316ee964a038091 commit: c8c1d3a1339ab5e575d330dbc248ffd59c8907e2 Author: Arthur Zamarin gentoo org> AuthorDate: Wed Apr 9 18:01:30 2025 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Wed Apr 9 18:01:30 2025 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=c8c1d3a1 BadPackageUpdate: fix when ran as only check Fixes: be92740c59c7dc0309c4e05f2f73ebdf339e2376 Signed-off-by: Arthur Zamarin gentoo.org> src/pkgcheck/checks/repo_metadata.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pkgcheck/checks/repo_metadata.py b/src/pkgcheck/checks/repo_metadata.py index 8225abbf..32f6b70d 100644 --- a/src/pkgcheck/checks/repo_metadata.py +++ b/src/pkgcheck/checks/repo_metadata.py @@ -105,7 +105,8 @@ class PackageUpdatesCheck(RepoCheck): base.LogMap("pkgcore.log.logger.error", BadPackageUpdate), ) - del self.repo.config.__dict__["_updates"] # clear cache for immutable dict + if hasattr(self.repo.config, "_updates"): + del self.repo.config.__dict__["_updates"] # clear cache for immutable dict # convert log warnings/errors into reports with base.LogReports(*logmap) as log_reports: repo_updates = self.repo.config.updates