summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2017-09-16 14:38:05 +0000
committerBrian Dolbec <dolsen@gentoo.org>2017-09-16 14:47:40 +0000
commit1147ec489953f3b9212328c8cc9e0fa31f594596 (patch)
tree701a4d0a142009a4af8dc239c34197dadcc2840d /dev-util/buildbot
parentdev-util/buildbot-worker: Improve pkg_config operation (diff)
downloadgentoo-1147ec489953f3b9212328c8cc9e0fa31f594596.tar.gz
gentoo-1147ec489953f3b9212328c8cc9e0fa31f594596.tar.bz2
gentoo-1147ec489953f3b9212328c8cc9e0fa31f594596.zip
dev-util/buildbot: Improve pkg_config operation
Package-Manager: Portage-2.3.6, Repoman-2.3.1
Diffstat (limited to 'dev-util/buildbot')
-rw-r--r--dev-util/buildbot/buildbot-0.9.10.ebuild10
1 files changed, 10 insertions, 0 deletions
diff --git a/dev-util/buildbot/buildbot-0.9.10.ebuild b/dev-util/buildbot/buildbot-0.9.10.ebuild
index f6bd9b88bae3..65f5d4a71384 100644
--- a/dev-util/buildbot/buildbot-0.9.10.ebuild
+++ b/dev-util/buildbot/buildbot-0.9.10.ebuild
@@ -171,6 +171,8 @@ pkg_postinst() {
pkg_config() {
local buildmaster_path="/var/lib/buildmaster"
+ local log_path="/var/log/buildbot_worker"
+
einfo "This will prepare a new buildmaster instance in ${buildmaster_path}."
einfo "Press Control-C to abort."
@@ -179,6 +181,8 @@ pkg_config() {
[[ -z "${instance_name}" ]] && die "Invalid instance name"
local instance_path="${buildmaster_path}/${instance_name}"
+ local instance_log_path="${log_path}/${instance_name}"
+
if [[ -e "${instance_path}" ]]; then
eerror "The instance with the specified name already exists:"
eerror "${instance_path}"
@@ -196,6 +200,12 @@ pkg_config() {
ln --symbolic --relative "/etc/init.d/buildmaster" "/etc/init.d/buildmaster.${instance_name}" \
|| die "Unable to create link to init file"
+ if [[ ! -d "${instance_log_path}" ]]; then
+ mkdir --parents "${instance_log_path}" || die "Unable to create directory ${instance_log_path}"
+ fi
+ ln --symbolic --relative "${instance_log_path}/twistd.log" "${instance_path}/twistd.log" \
+ || die "Unable to create link to log file"
+
einfo "Successfully created a buildmaster instance at ${instance_path}."
einfo "To change the default settings edit the master.cfg file in this directory."
}