treewalk: force AUTOCLEAN=yes if libs preserved
authorZac Medico <zmedico@gentoo.org>
Sat, 21 May 2011 14:22:00 +0000 (07:22 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 21 May 2011 14:22:00 +0000 (07:22 -0700)
pym/portage/dbapi/vartree.py

index 60d52a83eca46c3e08f44fd1f2baffe548f6a633..f53c209b2e48d602c894f53dcc8550ff405b4b43 100644 (file)
@@ -3443,7 +3443,12 @@ class dblink(object):
                else:
                        emerge_log = scheduler.dblinkEmergeLog
 
-               autoclean = self.settings.get("AUTOCLEAN", "yes") == "yes"
+               # If we have any preserved libraries then autoclean
+               # is forced so that preserve-libs logic doesn't have
+               # to account for the additional complexity of the
+               # AUTOCLEAN=no mode.
+               autoclean = self.settings.get("AUTOCLEAN", "yes") == "yes" \
+                       or preserve_paths
 
                if autoclean:
                        emerge_log(_(" >>> AUTOCLEAN: %s") % (slot_atom,))