public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/gentoolkit:gentoolkit commit in: man/, pym/gentoolkit/eclean/
@ 2013-07-08 18:30 Paul Varner
  0 siblings, 0 replies; only message in thread
From: Paul Varner @ 2013-07-08 18:30 UTC (permalink / raw
  To: gentoo-commits

commit:     0bd71cd8a16b54c9392afa30821e578315d53807
Author:     Paul Varner <fuzzyray <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  8 18:26:14 2013 +0000
Commit:     Paul Varner <fuzzyray <AT> gentoo <DOT> org>
CommitDate: Mon Jul  8 18:26:14 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=0bd71cd8

Rename eclean --destructive option to --deep (Bug #475808)

This is a cosmetic change only.  --destructive is still accepted for
backwards compatibility.  Additionally, options array still refers to
the option as destrcutive.

---
 man/eclean.1                 | 14 +++++++-------
 pym/gentoolkit/eclean/cli.py | 28 ++++++++++++++--------------
 2 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/man/eclean.1 b/man/eclean.1
index a6bad31..4267047 100644
--- a/man/eclean.1
+++ b/man/eclean.1
@@ -23,7 +23,7 @@ without recompiling it.  Sure, it's also a mode in which your DISTDIR and PKGDIR
 stay rather big (although still not growing infinitely).  For the 'distfiles', this
 mode is also quite slow because it requiries some access to the whole Portage tree.
 .PP
-If you use the \-\-destructive option, eclean will only protect files corresponding to
+If you use the \-\-deep option, eclean will only protect files corresponding to
 some currently installed package (taking their exact version into account).  It will
 save much more space, while still preserving sources files around for minor revision
 bumps, and binaries for reinstallation of corrupted packages.  But it won't keep files
@@ -31,7 +31,7 @@ for less usual operations like downgrading or reinstalling an unmerged package.
 is also the fastest execution mode (big difference for distfiles), and the one used by
 most other cleaning scripts around like yacleaner (at least in its version 0.3).
 .PP
-Somewhere in the middle, adding the \-\-package\-names option when using \-\-destructive
+Somewhere in the middle, adding the \-\-package\-names option when using \-\-deep
 will protect files corresponding to all existing versions of installed packages.  It will
 allow easy downgrading without recompilation or redownloading in case of trouble, but
 won't protect you against package uninstallation.
@@ -53,7 +53,7 @@ Finally, you can list some categories or package names to protect in exclusion f
 .TP
 \fB\-C, \-\-nocolor\fP				turn off colors on output
 .TP
-\fB\-d, \-\-destructive\fP			only keep the minimum for a reinstallation
+\fB\-d, \-\-deep\fP				only keep the minimum for a reinstallation
 .TP
 \fB\-e, \-\-exclude\-file=<path>\fP	path to the exclusion file
 \fB<path>\fP is the absolute path to the exclusion file you want to use.
@@ -63,7 +63,7 @@ you want to temporary ignore it.
 .TP
 \fB\-i, \-\-interactive\fP          ask confirmation before deleting
 .TP
-\fB\-n, \-\-package\-names\fP       protect all versions (\-\-destructive only)
+\fB\-n, \-\-package\-names\fP       protect all versions (\-\-deep only)
 .TP
 \fB\-p, \-\-pretend\fP              only display what would be cleaned
 .TP
@@ -97,7 +97,7 @@ FEATURES flags.
 command\-line.
 .SS "Options for the 'distfiles' action"
 .TP
-\fB\-f, \-\-fetch\-restricted\fP		protect fetch\-restricted files (\-\-destructive only)
+\fB\-f, \-\-fetch\-restricted\fP		protect fetch\-restricted files (\-\-deep only)
 .TP
 \fB\-s, \-\-size\-limit=<size>\fP	don't delete distfiles bigger than <size>
 <size> is a size specification: "10M" is "ten megabytes", "200K" is "two hundreds kilobytes",
@@ -161,7 +161,7 @@ are less than one month old, bigger than 50MB, or fetch\-restricted:
 .br
 .B # eclean\-dist \-d \-t1m \-s50M \-f
 .LP
-From a crontab, silently clean packages in the safest mode, and then distfiles in destructive
+From a crontab, silently clean packages in the safest mode, and then distfiles in deep
 mode but protecting files less than a week old, every sunday at 1am:
 .br
 .B 0 1 * * sun \ \ eclean \-C \-q packages ; eclean \-C \-q \-d \-t1w distfiles
@@ -172,7 +172,7 @@ While running and searching distfiles for cleaning, elcean will report any unava
 .".TP
 ."The policy used to decide if a distfile can be removed or not relies on the SRC_URI variables ."of ebuilds.  It means that if an ebuild uses files that are not part of its SRC_URI, eclean will ."probably remove them.  This are ebuilds bugs, please report them as such on ."http://bugs.gentoo.org.
 .".TP
-."In safest mode (default, without the \-\-destructive option), this script can be very slow.  There
+."In safest mode (default, without the \-\-deep option), this script can be very slow.  There
 ."is not much to do about it without hacking outside of the portage API.
 .SH "SEE ALSO"
 .TP

diff --git a/pym/gentoolkit/eclean/cli.py b/pym/gentoolkit/eclean/cli.py
index 1682fdb..e6c75d0 100644
--- a/pym/gentoolkit/eclean/cli.py
+++ b/pym/gentoolkit/eclean/cli.py
@@ -112,19 +112,19 @@ def printUsage(_error=None, help=None):
 	'merged-distfiles-options') or help:
 		print( "Available global", yellow("options")+":", file=out)
 		print( yellow(" -C, --nocolor")+
-			"            - turn off colors on output", file=out)
-		print( yellow(" -d, --destructive")+
-			"        - only keep the minimum for a reinstallation", file=out)
+			"             - turn off colors on output", file=out)
+		print( yellow(" -d, --deep")+
+			"                - only keep the minimum for a reinstallation", file=out)
 		print( yellow(" -e, --exclude-file=<path>")+
 			" - path to the exclusion file", file=out)
 		print( yellow(" -i, --interactive")+
-			"        - ask confirmation before deletions", file=out)
+			"         - ask confirmation before deletions", file=out)
 		print( yellow(" -n, --package-names")+
-			"      - protect all versions (when --destructive)", file=out)
+			"       - protect all versions (when --deep", file=out)
 		print( yellow(" -p, --pretend")+
-			"            - only display what would be cleaned", file=out)
+			"             - only display what would be cleaned", file=out)
 		print( yellow(" -q, --quiet")+
-			"              - be as quiet as possible", file=out)
+			"               - be as quiet as possible", file=out)
 		print( yellow(" -t, --time-limit=<time>")+
 			"   - don't delete files modified since "+yellow("<time>"), file=out)
 		print( "   "+yellow("<time>"), "is a duration: \"1y\" is"+
@@ -132,9 +132,9 @@ def printUsage(_error=None, help=None):
 		print( "   "+"Units are: y (years), m (months), w (weeks), "+
 				"d (days) and h (hours).", file=out)
 		print( yellow(" -h, --help")+ \
-			"               - display the help screen", file=out)
+			"                - display the help screen", file=out)
 		print( yellow(" -V, --version")+
-			"            - display version info", file=out)
+			"             - display version info", file=out)
 		print( file=out)
 	if _error == 'actions' or help == 'all':
 		print( "Available", green("actions")+":", file=out)
@@ -154,7 +154,7 @@ def printUsage(_error=None, help=None):
 		print("Available", yellow("options"),"for the",
 				green("distfiles"),"action:", file=out)
 		print( yellow(" -f, --fetch-restricted")+
-			"   - protect fetch-restricted files (when --destructive)", file=out)
+			"   - protect fetch-restricted files (when --deep)", file=out)
 		print( yellow(" -s, --size-limit=<size>")+
 			"  - don't delete distfiles bigger than "+yellow("<size>"), file=out)
 		print( "   "+yellow("<size>"), "is a size specification: "+
@@ -237,7 +237,7 @@ def parseArgs(options={}):
 			elif o in ("-C", "--nocolor"):
 				options['nocolor'] = True
 				pp.output.nocolor()
-			elif o in ("-d", "--destructive"):
+			elif o in ("-d", "--deep", "--destructive"):
 				options['destructive'] = True
 			elif o in ("-D", "--deprecated"):
 				options['deprecated'] = True
@@ -264,12 +264,12 @@ def parseArgs(options={}):
 					options['verbose'] = True
 			else:
 				return_code = False
-		# sanity check of --destructive only options:
+		# sanity check of --deep only options:
 		for opt in ('fetch-restricted', 'package-names'):
 			if (not options['destructive']) and options[opt]:
 				if not options['quiet']:
 					print( pp.error(
-						"--%s only makes sense in --destructive mode." % opt), file=sys.stderr)
+						"--%s only makes sense in --deep mode." % opt), file=sys.stderr)
 				options[opt] = False
 		if do_help:
 			if action:
@@ -281,7 +281,7 @@ def parseArgs(options={}):
 	# here are the different allowed command line options (getopt args)
 	getopt_options = {'short':{}, 'long':{}}
 	getopt_options['short']['global'] = "CdDipqe:t:nhVv"
-	getopt_options['long']['global'] = ["nocolor", "destructive",
+	getopt_options['long']['global'] = ["nocolor", "deep", "destructive",
 		"deprecated", "interactive", "pretend", "quiet", "exclude-file=",
 		"time-limit=", "package-names", "help", "version",  "verbose"]
 	getopt_options['short']['distfiles'] = "fs:"


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-07-08 18:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-08 18:30 [gentoo-commits] proj/gentoolkit:gentoolkit commit in: man/, pym/gentoolkit/eclean/ Paul Varner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox