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 2E8F8158064 for ; Fri, 3 May 2024 06:18:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 42431E2A36; Fri, 3 May 2024 06:18:21 +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 05C6AE2A36 for ; Fri, 3 May 2024 06:18:20 +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 B2FA233C4EE for ; Fri, 3 May 2024 06:18:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E7BEC93E for ; Fri, 3 May 2024 06:18:17 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1714717090.ada43fcd4306b1dac26606058ef97399beaa360a.sam@gentoo> Subject: [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/eclean/, man/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: man/eclean.1 pym/gentoolkit/eclean/cli.py X-VCS-Directories: pym/gentoolkit/eclean/ man/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: ada43fcd4306b1dac26606058ef97399beaa360a X-VCS-Branch: master Date: Fri, 3 May 2024 06:18:17 +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: 986fc78d-be6c-44c8-84c2-0b287b54880b X-Archives-Hash: fc9506e99e9c39a0ea5ea1424a0b3933 commit: ada43fcd4306b1dac26606058ef97399beaa360a Author: Sam James gentoo org> AuthorDate: Fri May 3 06:06:22 2024 +0000 Commit: Sam James gentoo org> CommitDate: Fri May 3 06:18:10 2024 +0000 URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=ada43fcd eclean: dist: make VCS cleaning dependent on --deep The man page clearly says that without --deep, users can expect eclean-dist to be conservative in cleaning up, and not consider the VDB, just the repo state. Honour that promise by making VCS cleaning dependent on --deep, given it involves VDB inspection to see what's installed. Bug: https://bugs.gentoo.org/923369 Signed-off-by: Sam James gentoo.org> man/eclean.1 | 1 + pym/gentoolkit/eclean/cli.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/man/eclean.1 b/man/eclean.1 index 53ba8a7..60cf1ca 100644 --- a/man/eclean.1 +++ b/man/eclean.1 @@ -106,6 +106,7 @@ etc. Units are: G, M, K and B. .TP \fB\-\-skip\-vcs\fP protect VCS sources for live ebuilds not installed +Only effective with \-\-deep. Without \-\-deep, no VCS cleaning is done. .SS "Options for the 'packages' action" .TP \fB\-i, \-\-ignore\-failure\fP ignore the failure to locate PKGDIR diff --git a/pym/gentoolkit/eclean/cli.py b/pym/gentoolkit/eclean/cli.py index 94f87f4..f5c22c2 100644 --- a/pym/gentoolkit/eclean/cli.py +++ b/pym/gentoolkit/eclean/cli.py @@ -424,7 +424,7 @@ def parseArgs(options={}): options["unique-use"] = True elif o in ("--no-clean-invalid"): options["no-clean-invalid"] = True - elif o in ("--skip-vcs"): + elif o in ("--skip-vcs") or not options["destructive"]: options["skip-vcs"] = True else: return_code = False @@ -602,11 +602,11 @@ def doAction(action, options, exclude={}, output=None): output.einfo("Cleaning " + files_type + "...") # do the cleanup, and get size of deleted files if options["pretend"]: - if options["skip-vcs"]: + if options["skip-vcs"] or not options["destructive"]: vcs = {} clean_size = cleaner.pretend_clean(clean_me, vcs) elif action in ["distfiles"]: - if options["skip-vcs"]: + if options["skip-vcs"] or not options["destructive"]: vcs = {} clean_size = cleaner.clean_dist(clean_me, vcs) elif action in ["packages"]: