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 (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0208C158094 for ; Sat, 9 Jul 2022 22:45:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 03CB6E08CE; Sat, 9 Jul 2022 22:45:22 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DD5B8E08CE for ; Sat, 9 Jul 2022 22:45:21 +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 EBC3B335D9C for ; Sat, 9 Jul 2022 22:45:20 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3318C391 for ; Sat, 9 Jul 2022 22:45:19 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1657406568.125142667c338eddb3777433e513fbe58e7bfd45.dolsen@gentoo> Subject: [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/eclean/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: pym/gentoolkit/eclean/search.py X-VCS-Directories: pym/gentoolkit/eclean/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 125142667c338eddb3777433e513fbe58e7bfd45 X-VCS-Branch: master Date: Sat, 9 Jul 2022 22:45:19 +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: 5d6f79ff-067f-4ca9-bc64-9f93cb0d62bf X-Archives-Hash: 2dcc0e934c688bd81326a1edbc32433e commit: 125142667c338eddb3777433e513fbe58e7bfd45 Author: Brian Dolbec gentoo org> AuthorDate: Sat Jul 9 22:35:33 2022 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Sat Jul 9 22:42:48 2022 +0000 URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=12514266 eclean: add early return for empty DISTDIR Gentoo-bug-url: https://bugs.gentoo.org/703282 Signed-off-by: Brian Dolbec gentoo.org> pym/gentoolkit/eclean/search.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pym/gentoolkit/eclean/search.py b/pym/gentoolkit/eclean/search.py index 365970c..60ced02 100644 --- a/pym/gentoolkit/eclean/search.py +++ b/pym/gentoolkit/eclean/search.py @@ -111,6 +111,10 @@ class DistfilesSearch: saved = {} deprecated = {} installed_included = False + # Check if DISTDIR is empty, return early + if not os.listdir(_distdir): + return clean_me, saved, deprecated + # create a big CPV->SRC_URI dict of packages # whose distfiles should be kept if (not destructive) or fetch_restricted: