* [gentoo-commits] proj/catalyst:master commit in: /, files/, targets/support/, modules/
@ 2012-10-29 19:43 Richard Farina
0 siblings, 0 replies; only message in thread
From: Richard Farina @ 2012-10-29 19:43 UTC (permalink / raw
To: gentoo-commits
commit: 8ca52570aa2d0e14b848692ddf759212d81168e3
Author: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 29 19:40:45 2012 +0000
Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Mon Oct 29 19:40:45 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=8ca52570
keep logs outside of chroot
Every time stage build is restarted, the build logs of the previous run
are lost. This new feature allows the logs to be kept outside the chroot
and thus protected from purging. This new feature forces portage to use
FEATURES="clean-logs" no matter what, but it should have no effect on
users not using the new functionality added by this patch.
This new function is DISABLED per default due to a lack of feedback,
however, it is highly suggested that this is made default for the next
release cycle.
---
catalyst | 3 +++
files/catalyst.conf | 5 +++++
modules/generic_stage_target.py | 6 ++++++
targets/support/chroot-functions.sh | 2 +-
4 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/catalyst b/catalyst
index 483a6e5..ed3fbd5 100755
--- a/catalyst
+++ b/catalyst
@@ -168,6 +168,9 @@ def parse_config(myconfig):
if myconf.has_key("var_tmpfs_portage"):
conf_values["var_tmpfs_portage"]=myconf["var_tmpfs_portage"];
+ if myconf.has_key("port_logdir"):
+ conf_values["port_logdir"]=myconf["port_logdir"];
+
def import_modules():
# import catalyst's own modules (i.e. catalyst_support and the arch modules)
targetmap={}
diff --git a/files/catalyst.conf b/files/catalyst.conf
index 49d2a15..ea74eb1 100644
--- a/files/catalyst.conf
+++ b/files/catalyst.conf
@@ -81,6 +81,11 @@ snapshot_cache="/var/tmp/catalyst/snapshot_cache"
# also where it will put its temporary files and caches.
storedir="/var/tmp/catalyst"
+# port_logdir is where all build logs will be kept. This dir will be automatically cleaned
+# of all logs over 30 days old. If left undefined the logs will remain in the build directory
+# as usual and get cleaned every time a stage build is restarted.
+# port_logdir="/var/tmp/catalyst/tmp"
+
# var_tmpfs_portage will mount a tmpfs for /var/tmp/portage so building takes place in RAM
# this feature requires a pretty large tmpfs ({open,libre}office needs ~8GB to build)
# WARNING: If you use too much RAM everything will fail horribly and it is not our fault.
diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py
index ae7d97c..b5efe05 100644
--- a/modules/generic_stage_target.py
+++ b/modules/generic_stage_target.py
@@ -226,6 +226,12 @@ class generic_stage_target(generic_target):
self.mountmap["/var/cache/icecream"]="/var/cache/icecream"
self.env["PATH"]="/usr/lib/icecc/bin:"+self.env["PATH"]
+ if self.settings.has_key("port_logdir"):
+ self.mounts.append("/var/log/portage")
+ self.mountmap["/var/log/portage"]=self.settings["port_logdir"]
+ self.env["PORT_LOGDIR"]="/var/log/portage"
+ self.env["PORT_LOGDIR_CLEAN"]='find "${PORT_LOGDIR}" -type f ! -name "summary.log*" -mtime +30 -delete'
+
def override_cbuild(self):
if self.makeconf.has_key("CBUILD"):
self.settings["CBUILD"]=self.makeconf["CBUILD"]
diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index fecbad4..35ffbaa 100644
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -64,7 +64,7 @@ get_libdir() {
setup_myfeatures(){
setup_myemergeopts
- export FEATURES="-news"
+ export FEATURES="-news clean-logs"
if [ -n "${clst_CCACHE}" ]
then
export clst_myfeatures="${clst_myfeatures} ccache"
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-10-29 19:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-29 19:43 [gentoo-commits] proj/catalyst:master commit in: /, files/, targets/support/, modules/ Richard Farina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox