Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconf/common.conf.example5
-rwxr-xr-xconf/slave.conf.example5
-rwxr-xr-xlib/load-configuration12
-rwxr-xr-xlib/mysql-functions19
4 files changed, 25 insertions, 16 deletions
diff --git a/conf/common.conf.example b/conf/common.conf.example
index a26a82a..7ffedf0 100755
--- a/conf/common.conf.example
+++ b/conf/common.conf.example
@@ -7,8 +7,3 @@
# uncomment and change the desired variables.
#work_dir="${base_dir}/work"
-
-#repo_names='packages community archlinux32'
-#repo_paths__packages="${work_dir}/repos/packages"
-#repo_paths__community="${work_dir}/repos/community"
-#repo_paths__archlinux32="${work_dir}/repos/packages32"
diff --git a/conf/slave.conf.example b/conf/slave.conf.example
index cda556b..4c1b0e0 100755
--- a/conf/slave.conf.example
+++ b/conf/slave.conf.example
@@ -13,6 +13,11 @@
#package_key='0x15eebadc0de'
+#repo_names='packages community archlinux32'
+#repo_paths__packages="${work_dir}/repos/packages"
+#repo_paths__community="${work_dir}/repos/community"
+#repo_paths__archlinux32="${work_dir}/repos/packages32"
+
# mirror of sources, identified (solely) by hash
#source_by_hash_mirror='http://sources.archlinux32.org/'
diff --git a/lib/load-configuration b/lib/load-configuration
index 5a1fd84..01c27b5 100755
--- a/lib/load-configuration
+++ b/lib/load-configuration
@@ -28,14 +28,12 @@ if pgrep -x mysqld >/dev/null 2>&1; then
. "${base_dir}/lib/mysql-functions"
else
i_am_the_master=false
-fi
-# TODO: some of this should be read from the database instead
-# (in mysql_retrieve_static_information)
-repo_names='packages community archlinux32'
-repo_paths__packages="${work_dir}/repos/packages"
-repo_paths__community="${work_dir}/repos/community"
-repo_paths__archlinux32="${work_dir}/repos/packages32"
+ repo_names='packages community archlinux32'
+ repo_paths__packages="${work_dir}/repos/packages"
+ repo_paths__community="${work_dir}/repos/community"
+ repo_paths__archlinux32="${work_dir}/repos/packages32"
+fi
master_build_server="buildmaster.archlinux32.org"
master_build_server_port="22"
diff --git a/lib/mysql-functions b/lib/mysql-functions
index 12de251..196e03b 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -1043,15 +1043,26 @@ mysql_show_binary_packages_in_repositories_issues() {
mysql_retrieve_static_information() {
eval "$(
{
- printf 'SELECT CONCAT('
+ printf 'SELECT REPLACE(CONCAT('
printf '"repository_ids__",'
printf '`architectures`.`name`,"_",'
printf '`repositories`.`name`,"=",'
printf '`repositories`.`id`'
- printf ') FROM `repositories`'
+ printf '),"-","_") FROM `repositories`'
mysql_join_repositories_architectures
+ printf ';\n'
+ printf 'SELECT CONCAT('
+ printf '"repo_names=\\"",'
+ printf 'REPLACE(GROUP_CONCAT(`git_repositories`.`name`),","," "),'
+ printf '"\\"")'
+ printf ' FROM `git_repositories`'
+ printf ' GROUP BY "1";\n'
+ printf 'SELECT CONCAT('
+ printf '"repo_paths__",'
+ printf '`git_repositories`.`name`,"=",'
+ printf '"\\"",`git_repositories`.`directory`,"\\"")'
+ printf ' FROM `git_repositories`;\n'
} | \
- mysql_run_query | \
- tr -- '-' '_'
+ mysql_run_query
)"
}