summaryrefslogtreecommitdiff
path: root/lib/intentions-queue
blob: 56742fab83b12676faa61cae1c8fed8daa8ec7e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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