Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/load-configuration5
-rwxr-xr-xlib/mysql-functions16
2 files changed, 7 insertions, 14 deletions
diff --git a/lib/load-configuration b/lib/load-configuration
index f70daeb..4edea90 100755
--- a/lib/load-configuration
+++ b/lib/load-configuration
@@ -26,13 +26,14 @@ if pgrep -x mysqld >/dev/null 2>&1; then
i_am_the_master=true
# shellcheck source=../lib/mysql-functions
. "${base_dir}/lib/mysql-functions"
- # TODO: maybe we should load some infos from the db in this case?
- # e.g. mysql_retrieve_repository_ids
+
+ mysql_retrieve_static_information
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"
diff --git a/lib/mysql-functions b/lib/mysql-functions
index 99ad9ce..12de251 100755
--- a/lib/mysql-functions
+++ b/lib/mysql-functions
@@ -204,11 +204,6 @@ mysql_add_package_source() {
mysql_generate_package_metadata() {
- # retrieve repository_ids if not yet done
- if [ -z "${repository_ids__any_build_list}" ]; then
- mysql_retrieve_repository_ids
- fi
-
( # new shell is intentional
current_repository_id="$1"
package="$2"
@@ -624,10 +619,6 @@ mysql_generate_package_metadata() {
# do a sanity check on the mysql database
mysql_sanity_check() {
- # retrieve repository_ids if not yet done
- if [ -z "${repository_ids__any_build_list}" ]; then
- mysql_retrieve_repository_ids
- fi
{
printf 'SELECT CONCAT("\\"any\\" build-assignment building \\"",`bp_arch`.`name`,"\\" binary package: ",`binary_packages`.`pkgname`)'
printf ' FROM `binary_packages`'
@@ -1046,9 +1037,10 @@ mysql_show_binary_packages_in_repositories_issues() {
mysql_run_query
}
-# mysql_retrieve_repository_ids
-# retrieve the ids of all known repositories into $repository_ids__$arch_$repo
-mysql_retrieve_repository_ids() {
+# mysql_retrieve_static_information
+# retrieve some static information from the database:
+# - ids of all known repositories -> $repository_ids__$arch_$repo
+mysql_retrieve_static_information() {
eval "$(
{
printf 'SELECT CONCAT('