summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-06-03 18:49:02 -0700
committerZac Medico <zmedico@gentoo.org>2011-06-03 18:49:02 -0700
commitb194947c9a379c8ab5a43ecd5fdef9478df0c197 (patch)
tree3eef32bf58a6fe0affd418350b042eb12113cd7f
parenteb8325c739fdafbff6652e43f6fe8074f1f0aa28 (diff)
downloadportage-b194947c9a379c8ab5a43ecd5fdef9478df0c197.tar.gz
portage-b194947c9a379c8ab5a43ecd5fdef9478df0c197.tar.bz2
portage-b194947c9a379c8ab5a43ecd5fdef9478df0c197.zip
Revert "dblink.merge: remove autoclean emergelog calls"
This reverts commit 352280549c9b72e7b916803dc6b03b959d0817e3. I'm planning to fix this so the emergelog calls are only enabled when emerge is the caller.
-rw-r--r--pym/portage/dbapi/vartree.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 452a38f2c..16cf48b76 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -57,6 +57,7 @@ from portage import _unicode_encode
from _emerge.AsynchronousLock import AsynchronousLock
from _emerge.EbuildBuildDir import EbuildBuildDir
from _emerge.EbuildPhase import EbuildPhase
+from _emerge.emergelog import emergelog
from _emerge.PollScheduler import PollScheduler
from _emerge.MiscFunctionsProcess import MiscFunctionsProcess
@@ -2957,6 +2958,9 @@ class dblink(object):
if str_buffer:
os.write(self._pipe, _unicode_encode(''.join(str_buffer)))
+ def _emerge_log(self, msg):
+ emergelog(False, msg)
+
def treewalk(self, srcroot, destroot, inforoot, myebuild, cleanup=0,
mydbapi=None, prev_mtimes=None, counter=None):
"""
@@ -3457,6 +3461,8 @@ class dblink(object):
match_from_list(PORTAGE_PACKAGE_ATOM, [self.mycpv]):
reinstall_self = True
+ emerge_log = self._emerge_log
+
# 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
@@ -3464,6 +3470,9 @@ class dblink(object):
autoclean = self.settings.get("AUTOCLEAN", "yes") == "yes" \
or preserve_paths
+ if autoclean:
+ emerge_log(_(" >>> AUTOCLEAN: %s") % (slot_atom,))
+
others_in_slot.append(self) # self has just been merged
for dblnk in list(others_in_slot):
if dblnk is self:
@@ -3471,6 +3480,7 @@ class dblink(object):
if not (autoclean or dblnk.mycpv == self.mycpv or reinstall_self):
continue
showMessage(_(">>> Safely unmerging already-installed instance...\n"))
+ emerge_log(_(" === Unmerging... (%s)") % (dblnk.mycpv,))
others_in_slot.remove(dblnk) # dblnk will unmerge itself now
dblnk._linkmap_broken = self._linkmap_broken
dblnk.settings["REPLACED_BY_VERSION"] = portage.versions.cpv_getversion(self.mycpv)
@@ -3480,6 +3490,11 @@ class dblink(object):
preserve_paths=preserve_paths)
dblnk.settings.pop("REPLACED_BY_VERSION", None)
+ if unmerge_rval == os.EX_OK:
+ emerge_log(_(" >>> unmerge success: %s") % (dblnk.mycpv,))
+ else:
+ emerge_log(_(" !!! unmerge FAILURE: %s") % (dblnk.mycpv,))
+
self.lockdb()
try:
# TODO: Check status and abort if necessary.