From 98d52cb3b6ae06535c72ad238f8ee867607b68a4 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 30 Aug 2010 16:46:09 -0700 Subject: [PATCH] When _ENABLE_DYN_LINK_MAP is False, show additional --depclean help and warnings advising use of revdep-rebuild. --- pym/_emerge/actions.py | 6 ++++++ pym/_emerge/help.py | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 5f59f891a..683d79b87 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -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") diff --git a/pym/_emerge/help.py b/pym/_emerge/help.py index 72bb56d41..371e00da2 100644 --- a/pym/_emerge/help.py +++ b/pym/_emerge/help.py @@ -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() -- 2.26.2