aboutsummaryrefslogtreecommitdiff
path: root/pym
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-05-03 07:06:22 +0100
committerSam James <sam@gentoo.org>2024-05-03 07:18:10 +0100
commitada43fcd4306b1dac26606058ef97399beaa360a (patch)
tree5f0f3c8160013cb84f82e298a4b9440d873c888d /pym
parentpackage: update example PORTDIR path (diff)
downloadgentoolkit-ada43fcd4306b1dac26606058ef97399beaa360a.tar.gz
gentoolkit-ada43fcd4306b1dac26606058ef97399beaa360a.tar.bz2
gentoolkit-ada43fcd4306b1dac26606058ef97399beaa360a.zip
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 <sam@gentoo.org>
Diffstat (limited to 'pym')
-rw-r--r--pym/gentoolkit/eclean/cli.py6
1 files changed, 3 insertions, 3 deletions
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"]: