From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/eclean/
Date: Tue, 22 Aug 2023 20:50:36 +0000 (UTC) [thread overview]
Message-ID: <1692737395.6b17633d0d74cb8fa0eeb46c8ee4f4f05d0e38b2.sam@gentoo> (raw)
commit: 6b17633d0d74cb8fa0eeb46c8ee4f4f05d0e38b2
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 22 20:43:25 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Aug 22 20:49:55 2023 +0000
URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=6b17633d
eclean-pkg: add --clean-invalid to help, fix parsing
* Rename --clean-invalids -> --clean-invalid
* Add --clean-invalid to help
* Make it default-off for now to match the option name (rather than
the help saying --no-clean-invalids).
(I could go either way on what the actual default should be, but this is more
conservative for now.)
* Fix typo in option name.
* Make it a package specific arg, not a global one.
Bug: https://bugs.gentoo.org/900224
Fixes: 204b1abca2c0cbbdad188c7fd4b84452c2f630a0
Fixes: a16d0d4fbfb4614832c4b682b41284a9050af29f
Signed-off-by: Sam James <sam <AT> gentoo.org>
pym/gentoolkit/eclean/cli.py | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/pym/gentoolkit/eclean/cli.py b/pym/gentoolkit/eclean/cli.py
index c8381a0..aa8b20f 100644
--- a/pym/gentoolkit/eclean/cli.py
+++ b/pym/gentoolkit/eclean/cli.py
@@ -261,6 +261,11 @@ def printUsage(_error=None, help=None, unresolved_invalids=None):
+ " - delete packages for which ebuild dependencies have changed",
file=out,
)
+ print(
+ yellow(" --clean-invalid")
+ + " - cleanup invalid binpkgs",
+ file=out,
+ )
print(
yellow(" -i, --ignore-failure")
+ " - ignore failure to locate PKGDIR",
@@ -413,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-invalids"):
- options["clean-invalids"] = False
+ elif o in ("-N", "--skip-invalid"):
+ options["clean-invalid"] = False
else:
return_code = False
# sanity check of --deep only options:
@@ -435,7 +440,7 @@ def parseArgs(options={}):
# here are the different allowed command line options (getopt args)
getopt_options = {"short": {}, "long": {}}
- getopt_options["short"]["global"] = "CdDipqe:t:nhVvN"
+ getopt_options["short"]["global"] = "CdDipqe:t:nhVv"
getopt_options["long"]["global"] = [
"nocolor",
"deep",
@@ -450,14 +455,14 @@ def parseArgs(options={}):
"help",
"version",
"verbose",
- "clean-inavlids",
]
getopt_options["short"]["distfiles"] = "fs:"
getopt_options["long"]["distfiles"] = ["fetch-restricted", "size-limit="]
- getopt_options["short"]["packages"] = "i"
+ getopt_options["short"]["packages"] = "iN"
getopt_options["long"]["packages"] = [
"ignore-failure",
"changed-deps",
+ "clean-invalid",
"unique-use",
]
# set default options, except 'nocolor', which is set in main()
@@ -474,8 +479,8 @@ def parseArgs(options={}):
options["verbose"] = False
options["changed-deps"] = False
options["ignore-failure"] = False
+ options["clean-invalid"] = False
options["unique-use"] = False
- options["clean-invalids"] = True
# if called by a well-named symlink, set the action accordingly:
action = None
# temp print line to ensure it is the svn/branch code running, etc..
@@ -621,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-invalids"]:
+ if invalids and options["clean-invalid"]:
if type(invalids) == list:
printUsage(_error="invalid_paths", unresolved_invalids=invalids)
sys.exit(1)
next reply other threads:[~2023-08-22 20:50 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-22 20:50 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-05-03 5:42 [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/eclean/ Sam James
2024-05-03 5:40 Sam James
2024-05-03 5:40 Sam James
2024-05-03 5:40 Sam James
2024-05-03 5:11 Sam James
2024-02-18 2:19 Brian Dolbec
2024-02-18 2:19 Brian Dolbec
2024-01-19 7:03 Sam James
2024-01-19 6:15 Sam James
2024-01-12 19:16 Matt Turner
2023-12-03 7:51 Sam James
2023-10-08 3:28 Sam James
2023-10-08 3:28 Sam James
2023-09-29 7:20 Sam James
2023-08-24 19:52 Sam James
2023-08-22 20:54 Sam James
2023-08-22 20:52 Sam James
2023-08-22 20:50 Sam James
2023-08-22 20:35 Sam James
2023-08-21 5:16 Sam James
2023-08-21 5:16 Sam James
2022-07-11 7:17 Brian Dolbec
2022-07-09 22:45 Brian Dolbec
2022-07-09 21:46 Brian Dolbec
2022-06-01 10:25 Yixun Lan
2022-05-28 15:28 Yixun Lan
2022-02-09 10:48 Sam James
2020-06-09 17:29 Zac Medico
2020-03-12 16:51 Matt Turner
2020-03-12 16:51 Matt Turner
2020-01-03 4:31 Matt Turner
2019-12-05 16:51 Matt Turner
2019-12-05 16:51 Matt Turner
2019-09-13 23:34 Zac Medico
2017-12-12 5:51 Zac Medico
2016-07-03 6:29 Zac Medico
2016-07-01 6:19 Zac Medico
2016-06-24 21:40 Zac Medico
2016-06-24 21:36 Zac Medico
2016-06-23 20:01 Paul Varner
2015-10-19 21:33 Paul Varner
2015-10-15 21:39 Paul Varner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1692737395.6b17633d0d74cb8fa0eeb46c8ee4f4f05d0e38b2.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox