When _ENABLE_DYN_LINK_MAP is False, show additional --depclean help
authorZac Medico <zmedico@gentoo.org>
Mon, 30 Aug 2010 23:46:09 +0000 (16:46 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 30 Aug 2010 23:46:09 +0000 (16:46 -0700)
and warnings advising use of revdep-rebuild.

pym/_emerge/actions.py
pym/_emerge/help.py

index 5f59f891a657ad24802f86812bef05c0eb0c9462..683d79b875272739b9f52438b60c849feaca2d85 100644 (file)
@@ -28,6 +28,7 @@ from portage import digraph
 from portage import _unicode_decode
 from portage.cache.cache_errors import CacheError
 from portage.const import GLOBAL_CONFIG_PATH, NEWS_LIB_PATH
+from portage.const import _ENABLE_DYN_LINK_MAP
 from portage.dbapi.dep_expand import dep_expand
 from portage.output import blue, bold, colorize, create_color_func, darkgreen, \
        red, yellow
@@ -534,6 +535,11 @@ def action_depclean(settings, trees, ldpath_mtimes,
        # specific packages.
 
        msg = []
+       if not _ENABLE_DYN_LINK_MAP:
+               msg.append("Depclean may break link level dependencies. Thus, it is\n")
+               msg.append("recommended to use a tool such as " + good("`revdep-rebuild`") + " (from\n")
+               msg.append("app-portage/gentoolkit) in order to detect such breakage.\n")
+               msg.append("\n")
        msg.append("Always study the list of packages to be cleaned for any obvious\n")
        msg.append("mistakes. Packages that are part of the world set will always\n")
        msg.append("be kept.  They can be manually added to this set with\n")
index 72bb56d4138a0ef355aa699f6c67f4bbd7a6b768..371e00da27f4afc871e1cc2ea10406954c12ad9b 100644 (file)
@@ -3,6 +3,7 @@
 
 from __future__ import print_function
 
+from portage.const import _ENABLE_DYN_LINK_MAP
 from portage.output import bold, turquoise, green
 
 def shorthelp():
@@ -93,6 +94,12 @@ def help(myopts, havecolor=1):
                "listed in package.provided (see portage(5)) may be removed by " + \
                "depclean, even if they are part of the world set."
 
+               if not _ENABLE_DYN_LINK_MAP:
+                       paragraph += " Also note that " + \
+                               "depclean may break link level dependencies. Thus, it is " + \
+                               "recommended to use a tool such as revdep-rebuild(1) " + \
+                               "in order to detect such breakage."
+
                for line in wrap(paragraph, desc_width):
                        print(desc_indent + line)
                print()