summaryrefslogtreecommitdiffstats
path: root/db-functions
diff options
context:
space:
mode:
Diffstat (limited to 'db-functions')
-rw-r--r--db-functions29
1 files changed, 8 insertions, 21 deletions
diff --git a/db-functions b/db-functions
index 18029ee..939f2d5 100644
--- a/db-functions
+++ b/db-functions
@@ -294,7 +294,7 @@ check_pkgsvn() {
[ $? -ge 1 ] && return 1
local repo="${2}"
- in_array "${repo}" $(get_repos_for_host) || return 1
+ in_array "${repo}" ${PKGREPOS[@]} || return 1
if [ ! -f "${WORKDIR}/pkgbuilds/${repo}/${pkgbase}" ]; then
mkdir -p "${WORKDIR}/pkgbuilds/${repo}"
@@ -320,13 +320,13 @@ check_pkgrepos() {
local pkgver="$(getpkgver ${pkgfile})"
[ $? -ge 1 ] && return 1
- if [ -f "${FTP_BASE}/$(get_pkgpool_for_host)/${pkgname}-${pkgver}-"*${PKGEXT} ]; then
+ if [ -f "${FTP_BASE}/${PKGPOOL}/${pkgname}-${pkgver}-"*${PKGEXT} ]; then
return 1
fi
local repo
local arch
- for repo in $(get_repos_for_host); do
+ for repo in ${PKGREPOS[@]}; do
for arch in ${ARCHES[@]}; do
if [ -f "${FTP_BASE}/${repo}/os/${arch}/${pkgname}-${pkgver}"*${PKGEXT} ]; then
return 1
@@ -337,22 +337,6 @@ check_pkgrepos() {
return 0
}
-get_repos_for_host() {
- if [ -n "${PKGREPO[$(hostname -s)]}" ]; then
- echo "${PKGREPO[$(hostname -s)]}"
- else
- echo "${PKGREPO['default']}"
- fi
-}
-
-get_pkgpool_for_host() {
- if [ -n "${PKGPOOL[$(hostname -s)]}" ]; then
- echo "${PKGPOOL[$(hostname -s)]}"
- else
- echo "${PKGPOOL['default']}"
- fi
-}
-
#usage: chk_license ${license[@]}"
chk_license() {
local l
@@ -397,9 +381,12 @@ pkgver_from_src() {
check_repo_permission() {
local repo=$1
- in_array "${repo}" $(get_repos_for_host) || return 1
+ [ ${#PKGREPOS[@]} -eq 0 ] && return 1
+ [ -z "${PKGPOOL}" ] && return 1
+
+ in_array "${repo}" ${PKGREPOS[@]} || return 1
- [ -w "$FTP_BASE/$(get_pkgpool_for_host)" ] || return 1
+ [ -w "$FTP_BASE/${PKGPOOL}" ] || return 1
local arch
for arch in ${ARCHES}; do