_fetch_log = "/var/log/emerge-fetch.log"
class _iface_class(SlotObject):
- __slots__ = ("dblinkEbuildPhase", "fetch",
+ __slots__ = ("dblinkEbuildPhase", "dblinkDisplayUnmerge", "fetch",
"register", "schedule", "unregister")
class _fetch_iface_class(SlotObject):
schedule=self._schedule_fetch)
self._sched_iface = self._iface_class(
dblinkEbuildPhase=self._dblink_ebuild_phase,
+ dblinkDisplayUnmerge=self._dblink_display_unmerge,
fetch=fetch_iface, register=self._register,
schedule=self._schedule_wait, unregister=self._unregister)
finally:
f.close()
+ def _dblink_display_unmerge(self, settings, msg, noiselevel=0):
+ log_path = settings.get("PORTAGE_LOG_FILE")
+ background = self._max_jobs > 1
+ if log_path is None:
+ portage.writemsg_stdout(msg, noiselevel=noiselevel)
+ else:
+ if not background:
+ portage.writemsg_stdout(msg, noiselevel=noiselevel)
+ self._append_to_log_path(log_path, msg)
+
def _dblink_ebuild_phase(self,
pkg_dblink, pkg_dbapi, ebuild_path, phase):
"""
@rtype: None
"""
+ if self._scheduler is None:
+ def showMessage(msg, noiselevel=0):
+ writemsg_stdout(msg, noiselevel=noiselevel)
+ else:
+ def showMessage(msg, noiselevel=0):
+ self._scheduler.dblinkDisplayUnmerge(
+ self.settings, msg, noiselevel=noiselevel)
+
if not pkgfiles:
- writemsg_stdout("No package files given... Grabbing a set.\n")
+ showMessage("No package files given... Grabbing a set.\n")
pkgfiles = self.getcontents()
if others_in_slot is None:
bsd_chflags.chflags(parent_name, pflags)
def show_unmerge(zing, desc, file_type, file_name):
- writemsg_stdout("%s %s %s %s\n" % \
+ showMessage("%s %s %s %s\n" % \
(zing, desc.ljust(8), file_type, file_name))
for objkey in mykeys:
obj = normalize_path(objkey)