summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-03-02 21:07:53 +0000
committerZac Medico <zmedico@gentoo.org>2010-03-02 21:07:53 +0000
commit18dcc0902a22f10192b7377aa08887ea1056f5e5 (patch)
tree6f6a451c1e4937ef38f89e56430dc59256d9c7c9 /pym
parent4d85055291a22c964ad5fc59eadeab9c208db454 (diff)
downloadportage-18dcc0902a22f10192b7377aa08887ea1056f5e5.tar.gz
portage-18dcc0902a22f10192b7377aa08887ea1056f5e5.tar.bz2
portage-18dcc0902a22f10192b7377aa08887ea1056f5e5.zip
Add a --quiet-unmerge-warn option to disable the warning message that's shown
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
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/actions.py4
-rw-r--r--pym/_emerge/help.py8
-rw-r--r--pym/_emerge/main.py1
3 files changed, 12 insertions, 1 deletions
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index d7dfa7ac9..f4b0f74a2 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -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 " + \
diff --git a/pym/_emerge/help.py b/pym/_emerge/help.py
index bfd77cec4..8b08b55fd 100644
--- a/pym/_emerge/help.py
+++ b/pym/_emerge/help.py
@@ -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 " + \
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index c557eeb22..f08ae04f9 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -69,6 +69,7 @@ options=[
"--onlydeps", "--pretend",
"--quiet",
"--quiet-build",
+"--quiet-unmerge-warn",
"--resume",
"--searchdesc",
"--skipfirst",