preserve-libs: preserve during uninstall
[portage.git] / pym / _emerge / actions.py
index 007984eea7ab4610dec04cd8ef6d024d35bdc2fe..215203a2fe89e1748a08cb3ad7dea7ed261ace12 100644 (file)
@@ -907,7 +907,8 @@ def calc_depclean(settings, trees, ldpath_mtimes,
 
        if cleanlist and \
                real_vardb._linkmap is not None and \
-               myopts.get('--depclean-lib-check') != 'n':
+               myopts.get("--depclean-lib-check") != "n" and \
+               "preserve-libs" not in settings.features:
 
                # Check if any of these packages are the sole providers of libraries
                # with consumers that have not been selected for removal. If so, these