summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-22 21:45:17 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-22 21:45:17 -0700
commitb151fa14f49c2b5e4da7bdfdb5eaf29aaf985a7b (patch)
tree98e9743127c411b46bfb2870389ebc8ab3c20f6a
parent5145ae6529e2b5e0b9ed0364cc42048fca482b86 (diff)
downloadportage-b151fa14f49c2b5e4da7bdfdb5eaf29aaf985a7b.tar.gz
portage-b151fa14f49c2b5e4da7bdfdb5eaf29aaf985a7b.tar.bz2
portage-b151fa14f49c2b5e4da7bdfdb5eaf29aaf985a7b.zip
Add support for FEATURES=binpkg-logs which is similar to unmerge-logs,
but applies to all binary package merges.
-rw-r--r--cnf/make.globals3
-rw-r--r--man/make.conf.54
-rw-r--r--pym/_emerge/Binpkg.py8
3 files changed, 14 insertions, 1 deletions
diff --git a/cnf/make.globals b/cnf/make.globals
index 6679918fd..e3c17c5d1 100644
--- a/cnf/make.globals
+++ b/cnf/make.globals
@@ -44,7 +44,8 @@ FETCHCOMMAND_RSYNC="rsync -avP \"\${URI}\" \"\${DISTDIR}/\${FILE}\""
RESUMECOMMAND_RSYNC="rsync -avP \"\${URI}\" \"\${DISTDIR}/\${FILE}\""
# Default user options
-FEATURES="assume-digests distlocks fixpackages fixlafiles news parallel-fetch protect-owned
+FEATURES="assume-digests binpkg-logs distlocks fixpackages
+ fixlafiles news parallel-fetch protect-owned
sandbox sfperms strict unknown-features-warn unmerge-logs
unmerge-orphans userfetch"
diff --git a/man/make.conf.5 b/man/make.conf.5
index 68137a816..a55e7fc97 100644
--- a/man/make.conf.5
+++ b/man/make.conf.5
@@ -209,6 +209,10 @@ existing digest, the digest will be regenerated regardless of whether or
not \fIassume\-digests\fR is enabled. The \fBebuild\fR(1) \fBdigest\fR command
has a \fB\-\-force\fR option that can be used to force regeneration of digests.
.TP
+.B binpkg\-logs
+Keep logs from successful binary package merges. This is relevant only when
+\fBPORT_LOGDIR\fR is set.
+.TP
.B buildpkg
Binary packages will be created for all packages that are merged. Also see
\fBquickpkg\fR(1) and \fBemerge\fR(1) \fB\-\-buildpkg\fR and
diff --git a/pym/_emerge/Binpkg.py b/pym/_emerge/Binpkg.py
index 7fc11ea59..89f136106 100644
--- a/pym/_emerge/Binpkg.py
+++ b/pym/_emerge/Binpkg.py
@@ -318,5 +318,13 @@ class Binpkg(CompositeTask):
finally:
settings.pop("PORTAGE_BINPKG_FILE", None)
self._unlock_builddir()
+
+ if retval == os.EX_OK and \
+ 'binpkg-logs' not in self.settings.features and \
+ self.settings.get("PORTAGE_LOG_FILE"):
+ try:
+ os.unlink(self.settings["PORTAGE_LOG_FILE"])
+ except OSError:
+ pass
return retval