summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2015-08-26 17:00:39 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2015-08-26 17:00:39 -0300
commit2dd7ba09177bf279d6517329439d7531982de25c (patch)
tree2b65863d7c93aeffc65d3686895375b24a731714
parentcfd73e09fcc97d6fa005a4622f7663a727579606 (diff)
update db-init and fix POOLS variables
-rwxr-xr-xextra/coadde/createrepos36
-rwxr-xr-xsrc/bin/db-init9
-rw-r--r--src/etc/dbscripts.d/gnu+hurd_add.cfg8
-rw-r--r--src/etc/dbscripts.d/gnu+hurd_native.cfg8
-rw-r--r--src/etc/dbscripts.d/gnu+linux_add.cfg8
-rw-r--r--src/etc/dbscripts.d/gnu+linux_add_arm.cfg8
-rw-r--r--src/etc/dbscripts.d/gnu+linux_add_legacy.cfg8
-rw-r--r--src/etc/dbscripts.d/gnu+linux_native.cfg8
8 files changed, 41 insertions, 52 deletions
diff --git a/extra/coadde/createrepos b/extra/coadde/createrepos
deleted file mode 100755
index 4416196..0000000
--- a/extra/coadde/createrepos
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-# Creates the repo structure defined in config
-
-source "$(dirname "$(readlink -e "$0")")/config_platforms"
-source "$(dirname "$(readlink -e "$0")")/db-functions"
-
-createrepos-usage() {
- msg "Usage: %s [platform1 platform2 ... platformX]" "${0##*/}"
- exit 1
-}
-
-for 'platform' in "${PLATFORMS[@]}"; do
- if [ -n $1 ]; then
- for '_platform' in "$@"; do
- # Rename plataform name ($_platform) to easily script usage
- _platform_name="${_platform/\//+}" _platform_name="${_platform_name,,}"
-
- if [ "${_platform_name}" == "${platform}" ]; then
- source "$(dirname "$(readlink -e "$0")")/config_${_platform}"
-
- mkdir -p -- "${REPO_DIR}"/{"${PKG_POOL}","${SRC_POOL}"} "${CLEANUP_DESTDIR}" "${SOURCE_CLEANUP_DESTDIR}" "${STAGING}"
-
- "$(dirname "$(readlink -e "$0")")/create-repo" -p "${_platform}" "${PKG_REPOS[@]}"
- else
- createrepos-usage
- fi
- done
- else
- source "$(dirname "$(readlink -e "$0")")/config_${platform}"
-
- mkdir -p -- "${REPO_DIR}"/{"${PKG_POOL}","${SRC_POOL}"} "${CLEANUP_DESTDIR}" "${SOURCE_CLEANUP_DESTDIR}" "${STAGING}"
-
- "$(dirname "$(readlink -e "$0")")/create-repo" "${PKG_REPOS[@]}"
- ;;
- fi
-done
diff --git a/src/bin/db-init b/src/bin/db-init
index 181e5bf..e63bf5a 100755
--- a/src/bin/db-init
+++ b/src/bin/db-init
@@ -3,8 +3,7 @@
CONFIG_DIR="$(dirname "$(readlink -e "$0")")/etc"
-source "${CONFIG_DIR}/dbscripts.cfg"
-source "${CONFIG_DIR}/dbscripts.d/db-functions"
+source "${CONFIG_DIR}"/dbscripts{.d/{db-functions,main},}.cfg
db-init-usage() {
msg "Usage: %s [platform1 platform2 ... platformX]" "${0##*/}"
@@ -20,7 +19,7 @@ for 'platform' in "${PLATFORMS[@]}"; do
if [ "${_platform_name}" == "${platform}" ]; then
source "${CONFIG_DIR}/dbscripts.d/${_platform_name}.cfg"
- mkdir -p -- "${REPO_DIR}"/{"${PKG_POOL}","${SRC_POOL}"} "${CLEANUP_DESTDIR}" "${SOURCE_CLEANUP_DESTDIR}" "${STAGING}"
+ mkdir -p -- "${REPO_DIR}"/{"${PKG_MAIN_POOLS}","${SRC_MAIN_POOLS}"} "${CLEANUP_DESTDIR}" "${SOURCE_CLEANUP_DESTDIR}" "${STAGING}"
else
db-init-usage
fi
@@ -28,6 +27,8 @@ for 'platform' in "${PLATFORMS[@]}"; do
else
source "${CONFIG_DIR}/dbscripts.d/${platform}.cfg"
- mkdir -p -- "${REPO_DIR}"/{"${PKG_POOL}","${SRC_POOL}"} "${CLEANUP_DESTDIR}" "${SOURCE_CLEANUP_DESTDIR}" "${STAGING}"
+ mkdir -p -- "${REPO_DIR}"/{"${PKG_MAIN_POOLS}","${SRC_MAIN_POOLS}"} "${CLEANUP_DESTDIR}" "${SOURCE_CLEANUP_DESTDIR}" "${STAGING}"
fi
done
+
+# "$(dirname "$(readlink -e "$0")")/db-repo-add" -p "${_platform}" "${PKG_REPOS[@]}"
diff --git a/src/etc/dbscripts.d/gnu+hurd_add.cfg b/src/etc/dbscripts.d/gnu+hurd_add.cfg
index cabe881..58be117 100644
--- a/src/etc/dbscripts.d/gnu+hurd_add.cfg
+++ b/src/etc/dbscripts.d/gnu+hurd_add.cfg
@@ -35,10 +35,14 @@ PKG_MULTILIB_REPOS=("${MAIN_MULTILIB_REPOS[@]}" "${DD_MULTILIB_REPOS[@]}")
# Directories where packages are shared between repos
# *relative to REPO_DIR*
-PKG_POOL="${PKG_POOL_DIR}/abslibre_${PLATFORM}"
+PKG_MAIN_POOLS=("${PKG_POOL_DIR}/abslibre_${PLATFORM}")
+PKG_DD_POOLS=("${PKG_POOL_DIR}/abs_${PLATFORM}")
+PKG_POOLS=("${PKG_MAIN_POOLS[@]}" "${PKG_DD_POOLS[@]}")
# Directories where sources are stored
-SRC_POOL="${SRC_POOL_DIR}/abslibre_${PLATFORM}"
+SRC_MAIN_POOLS=("${SRC_POOL_DIR}/abslibre_${PLATFORM}")
+SRC_DD_POOLS=("${SRC_POOL_DIR}/abs_${PLATFORM}")
+SRC_POOLS=("${SRC_MAIN_POOLS[@]}" "${SRC_DD_POOLS[@]}")
# Build System and Repository scripts
BS_MAIN_NAME="abslibre_${PLATFORM}"
diff --git a/src/etc/dbscripts.d/gnu+hurd_native.cfg b/src/etc/dbscripts.d/gnu+hurd_native.cfg
index 168a4f9..b6feb28 100644
--- a/src/etc/dbscripts.d/gnu+hurd_native.cfg
+++ b/src/etc/dbscripts.d/gnu+hurd_native.cfg
@@ -35,10 +35,14 @@ PKG_MULTILIB_REPOS=("${MAIN_MULTILIB_REPOS[@]}" "${DD_MULTILIB_REPOS[@]}")
# Directories where packages are shared between repos
# *relative to REPO_DIR*
-PKG_POOL="${PKG_POOL_DIR}/${PLATFORM}"
+PKG_MAIN_POOLS=("${PKG_POOL_DIR}/${PLATFORM}")
+PKG_DD_POOLS=()
+PKG_POOLS=("${PKG_MAIN_POOLS[@]}" "${PKG_DD_POOLS[@]}")
# Directories where sources are stored
-SRC_POOL="${SRC_POOL_DIR}/${PLATFORM}"
+SRC_MAIN_POOLS=("${SRC_POOL_DIR}/${PLATFORM}")
+SRC_DD_POOLS=()
+SRC_POOLS=("${SRC_MAIN_POOLS[@]}" "${SRC_DD_POOLS[@]}")
# Build System and Repository scripts
BS_MAIN_NAME="pbs_${PLATFORM}"
diff --git a/src/etc/dbscripts.d/gnu+linux_add.cfg b/src/etc/dbscripts.d/gnu+linux_add.cfg
index eb014f5..2cff8f4 100644
--- a/src/etc/dbscripts.d/gnu+linux_add.cfg
+++ b/src/etc/dbscripts.d/gnu+linux_add.cfg
@@ -35,10 +35,14 @@ PKG_MULTILIB_REPOS=("${MAIN_MULTILIB_REPOS[@]}" "${DD_MULTILIB_REPOS[@]}")
# Directories where packages are shared between repos
# *relative to REPO_DIR*
-PKG_POOL="${PKG_POOL_DIR}/abslibre_${PLATFORM}"
+PKG_MAIN_POOLS=("${PKG_POOL_DIR}/abslibre_${PLATFORM}")
+PKG_DD_POOLS=("${PKG_POOL_DIR}"/abs_{packages,community}_"${PLATFORM}")
+PKG_POOLS=("${PKG_MAIN_POOLS[@]}" "${PKG_DD_POOLS[@]}")
# Directories where sources are stored
-SRC_POOL="${SRC_POOL_DIR}/abslibre_${PLATFORM}"
+SRC_MAIN_POOLS=("${SRC_POOL_DIR}/abslibre_${PLATFORM}")
+SRC_DD_POOLS=("${SRC_POOL_DIR}"/abs_{packages,community}_"${PLATFORM}")
+SRC_POOLS=("${SRC_MAIN_POOLS[@]}" "${SRC_DD_POOLS[@]}")
# Build System and Repository scripts
BS_MAIN_NAME="abslibre_${PLATFORM}"
diff --git a/src/etc/dbscripts.d/gnu+linux_add_arm.cfg b/src/etc/dbscripts.d/gnu+linux_add_arm.cfg
index c00525d..3b8a9fb 100644
--- a/src/etc/dbscripts.d/gnu+linux_add_arm.cfg
+++ b/src/etc/dbscripts.d/gnu+linux_add_arm.cfg
@@ -35,10 +35,14 @@ PKG_MULTILIB_REPOS=("${MAIN_MULTILIB_REPOS[@]}" "${DD_MULTILIB_REPOS[@]}")
# Directories where packages are shared between repos
# *relative to REPO_DIR*
-PKG_POOL="${PKG_POOL_DIR}/abslibre_${PLATFORM}_arm"
+PKG_MAIN_POOLS=("${PKG_POOL_DIR}/abslibre_${PLATFORM}_arm")
+PKG_DD_POOLS=("${PKG_POOL_DIR}/abs_${PLATFORM}_arm")
+PKG_POOLS=("${PKG_MAIN_POOLS[@]}" "${PKG_DD_POOLS[@]}")
# Directories where sources are stored
-SRC_POOL="${SRC_POOL_DIR}/abslibre_${PLATFORM}_arm"
+SRC_MAIN_POOLS=("${SRC_POOL_DIR}/abslibre_${PLATFORM}_arm")
+SRC_DD_POOLS=("${SRC_POOL_DIR}/abs_${PLATFORM}_arm")
+SRC_POOLS=("${SRC_MAIN_POOLS[@]}" "${SRC_DD_POOLS[@]}")
# Build System and Repository scripts
BS_MAIN_NAME="abslibre_${PLATFORM}_arm"
diff --git a/src/etc/dbscripts.d/gnu+linux_add_legacy.cfg b/src/etc/dbscripts.d/gnu+linux_add_legacy.cfg
index 6f6d93e..4398a30 100644
--- a/src/etc/dbscripts.d/gnu+linux_add_legacy.cfg
+++ b/src/etc/dbscripts.d/gnu+linux_add_legacy.cfg
@@ -35,10 +35,14 @@ PKG_MULTILIB_REPOS=("${MAIN_MULTILIB_REPOS[@]}" "${DD_MULTILIB_REPOS[@]}")
# Directories where packages are shared between repos
# *relative to REPO_DIR*
-PKG_POOL="pool/parabola"
+PKG_MAIN_POOLS=('pool/parabola')
+PKG_DD_POOLS=('pool'/{packages,community})
+PKG_POOLS=("${PKG_MAIN_POOLS[@]}" "${PKG_DD_POOLS[@]}")
# Directories where sources are stored
-SRC_POOL="sources/parabola"
+SRC_MAIN_POOLS=('sources/parabola')
+SRC_DD_POOLS=('sources'/{packages,community})
+SRC_POOLS=("${SRC_MAIN_POOLS[@]}" "${SRC_DD_POOLS[@]}")
# Build System and Repository scripts
BS_MAIN_NAME="abslibre"
diff --git a/src/etc/dbscripts.d/gnu+linux_native.cfg b/src/etc/dbscripts.d/gnu+linux_native.cfg
index 697b68e..80be453 100644
--- a/src/etc/dbscripts.d/gnu+linux_native.cfg
+++ b/src/etc/dbscripts.d/gnu+linux_native.cfg
@@ -35,10 +35,14 @@ PKG_MULTILIB_REPOS=("${MAIN_MULTILIB_REPOS[@]}" "${DD_MULTILIB_REPOS[@]}")
# Directories where packages are shared between repos
# *relative to REPO_DIR*
-PKG_POOL="${PKG_POOL_DIR}/${PLATFORM}"
+PKG_MAIN_POOLS=("${PKG_POOL_DIR}/${PLATFORM}")
+PKG_DD_POOLS=()
+PKG_POOLS=("${PKG_MAIN_POOLS[@]}" "${PKG_DD_POOLS[@]}")
# Directories where sources are stored
-SRC_POOL="${SRC_POOL_DIR}/${PLATFORM}"
+SRC_MAIN_POOLS=("${SRC_POOL_DIR}/${PLATFORM}")
+SRC_DD_POOLS=()
+SRC_POOLS=("${SRC_MAIN_POOLS[@]}" "${SRC_DD_POOLS[@]}")
# Build System and Repository scripts
BS_MAIN_NAME="pbs_${PLATFORM}"