# Default user options
FEATURES="assume-digests distlocks fixpackages parallel-fetch protect-owned
- sandbox sfperms strict unmerge-orphans userfetch"
+ sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
# Ignore file collisions in /lib/modules since files inside this directory
# are never unmerged, and therefore collisions must be ignored in order for
Note that the test phase for a specific package may be disabled by masking
the "test" \fBUSE\fR flag in \fBpackage.use.mask\fR (see \fBportage\fR(5)).
.TP
+.B unmerge\-logs
+Keep logs from successful unmerge phases. This is relevant only when
+\fBPORT_LOGDIR\fR is set.
+.TP
.B unmerge\-orphans
If a file is not claimed by another package in the same slot and it is not
protected by \fICONFIG_PROTECT\fR, unmerge it even if the modification time or
catdir_lock = None
scheduler = self._scheduler
retval = -1
+ failures = 0
try:
if myebuildpath:
catdir_lock = lockdir(catdir)
# XXX: Decide how to handle failures here.
if retval != os.EX_OK:
+ failures += 1
writemsg(_("!!! FAILED prerm: %s\n") % retval, noiselevel=-1)
self._unmerge_pkgfiles(pkgfiles, others_in_slot)
# XXX: Decide how to handle failures here.
if retval != os.EX_OK:
+ failures += 1
writemsg(_("!!! FAILED postrm: %s\n") % retval, noiselevel=-1)
# Skip this if another package in the same slot has just been
unlockdir(catdir_lock)
if log_path is not None:
+
+ if not failures and 'unmerge-logs' not in self.settings.features:
+ try:
+ os.unlink(log_path)
+ except OSError:
+ pass
+
try:
st = os.stat(log_path)
except OSError: