Add a --quiet-unmerge-warn option to disable the warning message that's shown
authorZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 21:07:53 +0000 (21:07 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 21:07:53 +0000 (21:07 -0000)
prior to --unmerge actions. Thanks to Thomas Sachau <tommy@gentoo.org> for the
suggestion. (trunk r15486)

svn path=/main/branches/2.1.7/; revision=15687

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

index 82a2e0d62134977619b10fc5e61d84c8125de9af..a93839c5f119918d53f49f70bce2f499d2e75d20 100644 (file)
@@ -470,6 +470,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 d7dfa7ac97c78bfedf53526f843522ddb241e4b4..f4b0f74a24d47ecd85251c182d8f5363b4b9ba93 100644 (file)
@@ -2106,7 +2106,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 bfd77cec48b3c187fa1e241730f1c299bc9fba7d..8b08b55fd0c33a07f427aa5f52c5e3eed193f370 100644 (file)
@@ -503,6 +503,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 c557eeb2220101b2bed8ad0819b6def0d747f764..f08ae04f90823fa798126addd8550dd869c545b9 100644 (file)
@@ -69,6 +69,7 @@ options=[
 "--onlydeps",     "--pretend",
 "--quiet",
 "--quiet-build",
+"--quiet-unmerge-warn",
 "--resume",
 "--searchdesc",
 "--skipfirst",