summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-01-30 10:16:01 +0100
committerErich Eckner <git@eckner.net>2020-01-30 10:16:01 +0100
commit55c05642d2a49d55c6409beeb948130a305df5b7 (patch)
tree2d768bbcc673a04776fe487a8c1c2a7713743593 /lib
parent7d474c09fda627094f102fa6edd994d8b7cbf2f4 (diff)
downloadbuilder-55c05642d2a49d55c6409beeb948130a305df5b7.tar.xz
lib/intentions-queue started
Diffstat (limited to 'lib')
-rwxr-xr-xlib/common-functions22
-rwxr-xr-xlib/intentions-queue28
2 files changed, 28 insertions, 22 deletions
diff --git a/lib/common-functions b/lib/common-functions
index 358b30b..e7e44b9 100755
--- a/lib/common-functions
+++ b/lib/common-functions
@@ -11,28 +11,6 @@ fi
# TODO: remove hard-coded package suffixes
-# TODO: Create an intentions-queue: It should handle all mysql and
-# master mirror interactions which interact with each other or other
-# local actions (repo-add, repo-remove, ...).
-# Design idea: Create enumerated shell scripts which do the right thing
-# and remove themself after successful execution.
-# return-assignment would create the following scripts:
-# 1. get lock
-# 2. download database from mirror
-# 3. update package database
-# 4. update mysql database
-# 5. upload database and package to mirror
-# 6. release lock
-# db-update would create the following scripts:
-# 1. get lock
-# 2. determine, what needs to be done (and create script 3-8 accordingly)
-# 3. download database from mirror
-# 4. update package database
-# 5. update mysql database
-# 6. upload database to mirror
-# 7. update packages on mirror
-# 8. release lock
-
# find_pkgbuilds package repository git_repository git_revision mod_git_revision
# find the PKGBUILD and modification of $package from $repository
# sets $PKGBUILD and $PKGBUILD_mod
diff --git a/lib/intentions-queue b/lib/intentions-queue
new file mode 100755
index 0000000..56742fa
--- /dev/null
+++ b/lib/intentions-queue
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# contains functions related to the intentions-queue
+
+# shellcheck disable=SC2039,SC2119,SC2120
+
+if [ -z "${base_dir}" ]; then
+ # just to make shellcheck happy
+ . '../lib/load-configuration'
+fi
+
+# TODO: Create an intentions-queue: It should handle all mysql and
+# master mirror interactions which interact with each other or other
+# local actions (repo-add, repo-remove, ...).
+# Design idea: Create enumerated shell scripts which do the right thing
+# and remove themself after successful execution.
+# return-assignment would create the following scripts:
+# 1. download database from mirror
+# 2. update package database
+# 3. update mysql database
+# 4. upload database and package to mirror
+# db-update would create the following scripts (after getting the usual
+# database lock and determining what needs to be done):
+# 1. download database from mirror
+# 2. update package database
+# 3. update mysql database
+# 4. upload database to mirror
+# 5. update packages on mirror