summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-03-24 19:54:45 +0100
committerErich Eckner <git@eckner.net>2021-03-24 19:54:45 +0100
commitdee02afb3ebbcbad7c20cbde0fae46cd6bb27332 (patch)
tree458852901470ab68b8f27f0fee01c358b861402c
parentb64622d1832d8185937200f0e705e8260e065d98 (diff)
downloadbuilder-dee02afb3ebbcbad7c20cbde0fae46cd6bb27332.tar.xz
lib/load-configuration: the nit-picker needs the static info from the database, too - but *before* loading modifications
-rwxr-xr-xbin/nit-picker2
-rwxr-xr-xlib/load-configuration11
2 files changed, 6 insertions, 7 deletions
diff --git a/bin/nit-picker b/bin/nit-picker
index 30176f8..89df9fb 100755
--- a/bin/nit-picker
+++ b/bin/nit-picker
@@ -47,8 +47,6 @@ clean_up() {
tmp_dir=$(mktemp -d 'tmp.nit-picker.XXXXXXXXXX' --tmpdir)
trap 'clean_up' EXIT
-mysql_retrieve_static_information
-
if ${irc}; then
if pgrep -x ii; then
>&2 echo 'ii is already running - this will not work'
diff --git a/lib/load-configuration b/lib/load-configuration
index d8a5c09..37fd850 100755
--- a/lib/load-configuration
+++ b/lib/load-configuration
@@ -135,6 +135,12 @@ max_testing_duration="14"
# set default location of archbuild chroots
archbuild_chroots='/var/lib/archbuild'
+# load static values from the database
+if ${i_am_the_master} \
+|| [ "${0##*/}" = 'nit-picker' ]; then
+ mysql_retrieve_static_information
+fi
+
# possibly pull in custom modifications
if [ -r "${base_dir}/conf/common.conf" ]; then
@@ -154,11 +160,6 @@ if ! ${i_am_the_master} && \
. "${base_dir}/conf/slave.conf"
fi
-# load static values from the database
-if ${i_am_the_master}; then
- mysql_retrieve_static_information
-fi
-
# check / set up environment
if [ -z "${build_list_lock_file}" ]; then