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 A052415800A for ; Thu, 24 Aug 2023 19:52:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C87982BC015; Thu, 24 Aug 2023 19:52:25 +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 A947B2BC015 for ; Thu, 24 Aug 2023 19:52:25 +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 A2530340C58 for ; Thu, 24 Aug 2023 19:52:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 01C561071 for ; Thu, 24 Aug 2023 19:52:23 +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: <1692906740.9ea9cfe27f3debe4f97f3b04da6681fc3ae11b88.sam@gentoo> Subject: [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/eclean/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: pym/gentoolkit/eclean/cli.py X-VCS-Directories: pym/gentoolkit/eclean/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 9ea9cfe27f3debe4f97f3b04da6681fc3ae11b88 X-VCS-Branch: master Date: Thu, 24 Aug 2023 19:52:23 +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: 9217118a-66d3-44d3-b5ed-37f326ee50cb X-Archives-Hash: a26d7bc42664c93e02efca425dfff2b1 commit: 9ea9cfe27f3debe4f97f3b04da6681fc3ae11b88 Author: Siddhanth Rathod gmail com> AuthorDate: Thu Aug 24 15:41:35 2023 +0000 Commit: Sam James gentoo org> CommitDate: Thu Aug 24 19:52:20 2023 +0000 URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=9ea9cfe2 eclean: Make cleaning invalid default Bug: https://bugs.gentoo.org/900224 Signed-off-by: Siddhanth Rathod gmail.com> Closes: https://github.com/gentoo/gentoolkit/pull/31 Signed-off-by: Sam James gentoo.org> pym/gentoolkit/eclean/cli.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pym/gentoolkit/eclean/cli.py b/pym/gentoolkit/eclean/cli.py index 75c5c63..b180641 100644 --- a/pym/gentoolkit/eclean/cli.py +++ b/pym/gentoolkit/eclean/cli.py @@ -262,7 +262,8 @@ def printUsage(_error=None, help=None, unresolved_invalids=None): file=out, ) print( - yellow(" -N, --clean-invalid") + " - cleanup invalid binpkgs", + yellow(" --no-clean-invalid") + + " - Skip cleaning invalid binpkgs", file=out, ) print( @@ -417,8 +418,8 @@ def parseArgs(options={}): options["ignore-failure"] = True elif o in ("-u", "--unique-use"): options["unique-use"] = True - elif o in ("-N", "--skip-invalid"): - options["clean-invalid"] = False + elif o in ("--no-clean-invalid"): + options["no-clean-invalid"] = True else: return_code = False # sanity check of --deep only options: @@ -457,12 +458,12 @@ def parseArgs(options={}): ] getopt_options["short"]["distfiles"] = "fs:" getopt_options["long"]["distfiles"] = ["fetch-restricted", "size-limit="] - getopt_options["short"]["packages"] = "iNu" + getopt_options["short"]["packages"] = "iu" getopt_options["long"]["packages"] = [ "ignore-failure", "changed-deps", - "clean-invalid", "unique-use", + "no-clean-invalid", ] # set default options, except 'nocolor', which is set in main() options["interactive"] = False @@ -478,7 +479,7 @@ def parseArgs(options={}): options["verbose"] = False options["changed-deps"] = False options["ignore-failure"] = False - options["clean-invalid"] = False + options["no-clean-invalid"] = False options["unique-use"] = False # if called by a well-named symlink, set the action accordingly: action = None @@ -625,7 +626,7 @@ def doAction(action, options, exclude={}, output=None): output.set_colors("deprecated") output.list_pkgs(deprecated) if action in ["packages"]: - if invalids and options["clean-invalid"]: + if invalids and not options["no-clean-invalid"]: if type(invalids) == list: printUsage(_error="invalid_paths", unresolved_invalids=invalids) sys.exit(1)