Add _DEPCLEAN_LIB_CHECK_DEFAULT constant.
authorZac Medico <zmedico@gentoo.org>
Fri, 21 Sep 2012 18:40:20 +0000 (11:40 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 21 Sep 2012 18:40:20 +0000 (11:40 -0700)
This will allow for the option to be available in the stable branch
without changing the default --depclean behavior.

pym/_emerge/actions.py
pym/portage/const.py

index 9a023a84a11515adb34aaf8b1930409666dd5eae..8e75dad466a932aacf6e4609c07e320480bd00e2 100644 (file)
@@ -31,7 +31,7 @@ from portage import shutil
 from portage import eapi_is_supported, _unicode_decode
 from portage.cache.cache_errors import CacheError
 from portage.const import GLOBAL_CONFIG_PATH
-from portage.const import _ENABLE_DYN_LINK_MAP
+from portage.const import _ENABLE_DYN_LINK_MAP, _DEPCLEAN_LIB_CHECK_DEFAULT
 from portage.dbapi.dep_expand import dep_expand
 from portage.dbapi._expand_new_virt import expand_new_virt
 from portage.dep import Atom
@@ -941,7 +941,7 @@ def calc_depclean(settings, trees, ldpath_mtimes,
 
        if cleanlist and \
                real_vardb._linkmap is not None and \
-               myopts.get("--depclean-lib-check") != "n" and \
+               myopts.get("--depclean-lib-check", _DEPCLEAN_LIB_CHECK_DEFAULT) != "n" and \
                "preserve-libs" not in settings.features:
 
                # Check if any of these packages are the sole providers of libraries
index 49a14d3ab9b374b951be1a63f90e3e9f54a6f85b..1e3da36f2c09be3a2de84da0b847bc5db57495a5 100644 (file)
@@ -167,6 +167,7 @@ if "PORTAGE_OVERRIDE_EPREFIX" in os.environ:
 # Private constants for use in conditional code in order to minimize the diff
 # between branches.
 _ENABLE_DYN_LINK_MAP    = True
+_DEPCLEAN_LIB_CHECK_DEFAULT = True
 _ENABLE_PRESERVE_LIBS   = True
 _ENABLE_REPO_NAME_WARN  = True
 _ENABLE_SET_CONFIG      = True