diff options
author | Siddhanth Rathod <xsiddhanthrathod@gmail.com> | 2023-08-24 21:11:35 +0530 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-08-24 20:52:20 +0100 |
commit | 9ea9cfe27f3debe4f97f3b04da6681fc3ae11b88 (patch) | |
tree | fb74b21d164afdb4b9212655097b9211c46d08ef | |
parent | eclean-pkg: placate black (diff) | |
download | gentoolkit-9ea9cfe27f3debe4f97f3b04da6681fc3ae11b88.tar.gz gentoolkit-9ea9cfe27f3debe4f97f3b04da6681fc3ae11b88.tar.bz2 gentoolkit-9ea9cfe27f3debe4f97f3b04da6681fc3ae11b88.zip |
eclean: Make cleaning invalid default
Bug: https://bugs.gentoo.org/900224
Signed-off-by: Siddhanth Rathod <xsiddhanthrathod@gmail.com>
Closes: https://github.com/gentoo/gentoolkit/pull/31
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | pym/gentoolkit/eclean/cli.py | 15 |
1 files 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) |