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) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B669A158091 for ; Fri, 17 Jun 2022 17:05:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DF172E0970; Fri, 17 Jun 2022 17:05:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 C9EE0E0970 for ; Fri, 17 Jun 2022 17:05:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 9392B34181A for ; Fri, 17 Jun 2022 17:05:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EB5DF475 for ; Fri, 17 Jun 2022 17:05:38 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1655485309.9ab9368c3324d615f1234d1ccb03eae939c393cf.floppym@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: lib/_emerge/actions.py X-VCS-Directories: lib/_emerge/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: 9ab9368c3324d615f1234d1ccb03eae939c393cf X-VCS-Branch: master Date: Fri, 17 Jun 2022 17:05:38 +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: 39f0f789-5b47-41d6-b12c-bee919cac16c X-Archives-Hash: 5592d4fad6c5b2105006e08524c42ed5 commit: 9ab9368c3324d615f1234d1ccb03eae939c393cf Author: John Helmert III gentoo org> AuthorDate: Wed Jun 15 22:11:17 2022 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Fri Jun 17 17:01:49 2022 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=9ab9368c depclean: return failure when requested packages aren't depcleaned Closes: https://bugs.gentoo.org/851750 Closes: https://github.com/gentoo/portage/pull/840 Signed-off-by: John Helmert III gentoo.org> Signed-off-by: Mike Gilbert gentoo.org> lib/_emerge/actions.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/_emerge/actions.py b/lib/_emerge/actions.py index 0bf2d88b1..e2f3f2ccf 100644 --- a/lib/_emerge/actions.py +++ b/lib/_emerge/actions.py @@ -1697,6 +1697,11 @@ def _calc_depclean(settings, trees, ldpath_mtimes, myopts, action, args_set, spi cleanlist.append(node.cpv) return _depclean_result(0, cleanlist, ordered, required_pkgs_total, resolver) + if args_set and "--pretend" not in myopts: + # If the cleanlist is empty but we were given packages to clean, + # we aren't successfully depcleaning. Return failure unless + # we're pretending. + return _depclean_result(1, [], False, required_pkgs_total, resolver) return _depclean_result(0, [], False, required_pkgs_total, resolver)