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>
Thu, 26 May 2011 03:47:41 +0000 (20:47 -0700)
pym/portage/dbapi/vartree.py

index 566861ef022e05f4a8188a1e75d25f8237c23e0a..6e92c9e3803b4e086fa8d2ac26f8944f3c043c2c 100644 (file)
@@ -3387,7 +3387,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,))