Add a --quiet-unmerge-warn option to disable the warning message that's shown
authorZac Medico <zmedico@gentoo.org>
Sun, 28 Feb 2010 02:33:46 +0000 (02:33 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 28 Feb 2010 02:33:46 +0000 (02:33 -0000)
prior to --unmerge actions. Thanks to Thomas Sachau <tommy@gentoo.org> for the
suggestion.

svn path=/main/trunk/; revision=15486

man/emerge.1
pym/_emerge/actions.py
pym/_emerge/help.py
pym/_emerge/main.py

index f6be0c565f4fdb994cc4be56ec5825d2813f3248..ae16a9cefa4601bd474025aba2f1bf7439f833ea 100644 (file)
@@ -477,6 +477,12 @@ output from portage's displays.
 Redirect all build output to logs alone, and do not
 display it on stdout.
 .TP
+.BR \-\-quiet\-unmerge\-warn
+Disable the warning message that's shown prior to
+\fB\-\-unmerge\fR actions. This option is intended
+to be set in the \fBmake.conf\fR(5)
+\fBEMERGE_DEFAULT_OPTS\fR variable.
+.TP
 .BR "\-\-rebuilt\-binaries[=n]"
 Replace installed packages with binary packages that have
 been rebuilt. Rebuilds are detected by comparison of
index c1aa20ba25d045c08ce617cca962f0fb14d39daf..6cb6904580874f0dacb8b95ccfbe057856b9463e 100644 (file)
@@ -2282,7 +2282,9 @@ def action_uninstall(settings, trees, ldpath_mtimes,
        if files and not valid_atoms:
                return 1
 
-       if action == 'unmerge' and '--quiet' not in opts:
+       if action == 'unmerge' and \
+               '--quiet' not in opts and \
+               '--quiet-unmerge-warn' not in opts:
                msg = "This action can remove important packages! " + \
                        "In order to be safer, use " + \
                        "`emerge -pv --depclean <atom>` to check for " + \
index 867902a6cc5795eb5a0f1b3fddb70f7dabdf260a..1dfb63a47bd919a853ee8a1a70c32c04c93322f1 100644 (file)
@@ -506,6 +506,14 @@ def help(myopts, havecolor=1):
                for line in wrap(desc, desc_width):
                        print(desc_indent + line)
                print()
+               print("       "+green("--quiet-unmerge-warn"))
+               desc = "Disable the warning message that's shown prior to " + \
+                       "--unmerge actions. This option is intended " + \
+                       "to be set in the make.conf(5) " + \
+                       "EMERGE_DEFAULT_OPTS variable."
+               for line in wrap(desc, desc_width):
+                       print(desc_indent + line)
+               print()
                print("       "+green("--rebuilt-binaries") + "[=%s]" % turquoise("n"))
                desc = "Replace installed packages with binary packages that have " + \
                        "been rebuilt. Rebuilds are detected by comparison of " + \
index 9fe255da20632cd402cae93daf7e791b2e9eedd2..e725da87c5c59530d44b3b2c7903b0d07e49eb05 100644 (file)
@@ -69,6 +69,7 @@ options=[
 "--onlydeps",     "--pretend",
 "--quiet",
 "--quiet-build",
+"--quiet-unmerge-warn",
 "--resume",
 "--searchdesc",
 "--skipfirst",