Disable the --depclean-lib-check option when _ENABLE_DYN_LINK_MAP
authorZac Medico <zmedico@gentoo.org>
Wed, 8 Sep 2010 01:48:41 +0000 (18:48 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 8 Sep 2010 01:48:41 +0000 (18:48 -0700)
is False.

pym/_emerge/help.py
pym/_emerge/main.py

index 371e00da27f4afc871e1cc2ea10406954c12ad9b..0a4241d37f3aff536bf362e745449913b5da42ae 100644 (file)
@@ -395,15 +395,18 @@ def help(myopts, havecolor=1):
                print("              that are not directly listed in the dependencies of a package.")
                print("              Also see --with-bdeps for behavior with respect to build time")
                print("              dependencies that are not strictly required.")
-               print() 
-               print("       " + green("--depclean-lib-check") + "[=%s]" % turquoise("n"))
-               desc = "Account for library link-level dependencies during " + \
-                       "--depclean and --prune actions. This " + \
-                       "option is enabled by default. In some cases this can " + \
-                       "be somewhat time-consuming."
-               for line in wrap(desc, desc_width):
-                       print(desc_indent + line)
                print()
+
+               if _ENABLE_DYN_LINK_MAP:
+                       print("       " + green("--depclean-lib-check") + "[=%s]" % turquoise("n"))
+                       desc = "Account for library link-level dependencies during " + \
+                               "--depclean and --prune actions. This " + \
+                               "option is enabled by default. In some cases this can " + \
+                               "be somewhat time-consuming."
+                       for line in wrap(desc, desc_width):
+                               print(desc_indent + line)
+                       print()
+
                print("       "+green("--emptytree")+" ("+green("-e")+" short option)")
                desc = "Reinstalls target atoms and their entire deep " + \
                        "dependency tree, as though no packages are currently " + \
index 64733ceaac14f52ee47a8dfd94b8dac80d5b424b..062d79dad8a80385a047e1bd1cc18c8506d84f1e 100644 (file)
@@ -24,6 +24,7 @@ from portage.output import create_color_func
 good = create_color_func("GOOD")
 bad = create_color_func("BAD")
 
+from portage.const import _ENABLE_DYN_LINK_MAP
 import portage.elog
 import portage.util
 import portage.locks
@@ -396,7 +397,6 @@ def insert_optional_args(args):
                '--autounmask'           : ('n',),
                '--complete-graph' : ('n',),
                '--deep'       : valid_integers,
-               '--depclean-lib-check'   : ('n',),
                '--deselect'   : ('n',),
                '--binpkg-respect-use'   : ('n', 'y',),
                '--fail-clean'           : ('n',),
@@ -414,6 +414,9 @@ def insert_optional_args(args):
                '--usepkgonly'           : ('n',),
        }
 
+       if _ENABLE_DYN_LINK_MAP:
+               default_arg_opts['--depclean-lib-check'] = ('n',)
+
        short_arg_opts = {
                'D' : valid_integers,
                'j' : valid_integers,
@@ -569,12 +572,6 @@ def parse_opts(tmpcmdline, silent=False):
                        "action" : "store"
                },
 
-               "--depclean-lib-check": {
-                       "help"    : "check for consumers of libraries before removing them",
-                       "type"    : "choice",
-                       "choices" : ("True", "n")
-               },
-
                "--deselect": {
                        "help"    : "remove atoms/sets from the world file",
                        "type"    : "choice",
@@ -718,6 +715,13 @@ def parse_opts(tmpcmdline, silent=False):
 
        }
 
+       if _ENABLE_DYN_LINK_MAP:
+               argument_options["--depclean-lib-check"] = {
+                       "help"    : "check for consumers of libraries before removing them",
+                       "type"    : "choice",
+                       "choices" : ("True", "n")
+               }
+
        from optparse import OptionParser
        parser = OptionParser()
        if parser.has_option("--help"):