diff options
-rwxr-xr-x | createrepos | 2 | ||||
-rwxr-xr-x | cron-jobs/ftpdir-cleanup | 4 | ||||
-rwxr-xr-x | cron-jobs/repo-sanity-check | 2 | ||||
-rwxr-xr-x | cron-jobs/sourceballs | 8 | ||||
-rwxr-xr-x | db-cleanup | 2 | ||||
-rwxr-xr-x | db-list-unsigned-packages | 2 | ||||
-rwxr-xr-x | db-update | 2 | ||||
-rw-r--r-- | etc/dbscripts.d/gnu+linux.cfg | 1 | ||||
-rw-r--r-- | etc/dbscripts.d/gnu+linux_arm_arch_legacy.cfg | 1 | ||||
-rw-r--r-- | etc/dbscripts.d/gnu+linux_x86_arch_legacy.cfg | 1 | ||||
-rw-r--r-- | share/db-functions | 8 | ||||
-rw-r--r-- | test/lib/common.inc | 6 |
12 files changed, 18 insertions, 21 deletions
diff --git a/createrepos b/createrepos index df279bd..b00359d 100755 --- a/createrepos +++ b/createrepos @@ -5,4 +5,4 @@ source "$(dirname "$(readlink -e "$0")")/etc/dbscripts.cfg" mkdir -p -- "${root_dir}"/{"${native_packages_pool}","${native_sources_pool}"} "${cleanup_destination_directory}" "${source_cleanup_destination_directory}" "${staging_directory}" -"$(dirname "$(readlink -e "$0")")/create-repo" "${repositories[@]}" +"$(dirname "$(readlink -e "$0")")/create-repo" "${main_repositories[@]}" diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup index 254b1c9..faa747a 100755 --- a/cron-jobs/ftpdir-cleanup +++ b/cron-jobs/ftpdir-cleanup @@ -24,7 +24,7 @@ clean_pkg() { "${cleanup_dryrun}" && warning 'dry run mode is active' -for repo in "${repositories[@]}"; do +for repo in "${main_repositories[@]}"; do for arch in "${native_architectures[@]}"; do if [ ! -f "${root_dir}/${repo}/os/${arch}/${repo}${database_extension_suffixfile}" ]; then continue @@ -79,7 +79,7 @@ if [ ${#old_pkgs[@]} -ge 1 ]; then done fi -for repo in "${repositories[@]}"; do +for repo in "${main_repositories[@]}"; do for arch in "${native_architectures[@]}"; do repo_unlock "${repo}" "${arch}" done diff --git a/cron-jobs/repo-sanity-check b/cron-jobs/repo-sanity-check index 1963812..aacac8a 100755 --- a/cron-jobs/repo-sanity-check +++ b/cron-jobs/repo-sanity-check @@ -8,7 +8,7 @@ source "$(dirname "$(readlink -e "$0")")/../etc/dbscripts.cfg" source "$(dirname "$(readlink -e "$0")")/../share/db-functions" # Traverse all repos -for _repo in "${repositories[@]}"; do +for _repo in "${main_repositories[@]}"; do msg "Cleaning up [%s]" "${_repo}" # Find all pkgnames on this repo's abs diff --git a/cron-jobs/sourceballs b/cron-jobs/sourceballs index d01b91b..9deaf71 100755 --- a/cron-jobs/sourceballs +++ b/cron-jobs/sourceballs @@ -7,7 +7,7 @@ pushd "${work_directory}" >/dev/null script_lock -for repo in "${repositories[@]}"; do +for repo in "${main_repositories[@]}"; do for arch in "${native_architectures[@]}"; do repo_lock "${repo}" "${arch}" || exit 1 done @@ -18,7 +18,7 @@ renice +10 -p $$ > /dev/null # Create a readable file for each repo with the following format # <pkgbase|pkgname> <pkgver>-<pkgrel> <arch> <license>[ <license>] -for repo in "${repositories[@]}"; do +for repo in "${main_repositories[@]}"; do for arch in "${native_architectures[@]}"; do # Repo does not exist; skip it if [ ! -f "${root_dir}/${repo}/os/${arch}/${repo}${database_extension_suffixfile}" ]; then @@ -39,7 +39,7 @@ for repo in "${repositories[@]}"; do done | sort -u > "${work_directory}/db-${repo}" done -for repo in "${repositories[@]}"; do +for repo in "${main_repositories[@]}"; do for arch in "${native_architectures[@]}"; do repo_unlock "${repo}" "${arch}" done @@ -49,7 +49,7 @@ done find "${root_dir}/${native_sources_pool}" -xtype f -name "*${source_extension_suffixfile}" -printf '%f\n' | sort -u > "${work_directory}/available-src-pkgs" # Check for all packages if we need to build a source package -for repo in "${repositories[@]}"; do +for repo in "${main_repositories[@]}"; do newpkgs=() failedpkgs=() while read line; do @@ -31,7 +31,7 @@ EXTRAFLAGS=() filter=$(mktemp -t "${0##*/}.XXXXXXXXXX") trap "rm -f -- $(printf %q "$filter")" EXIT -for _repo in "${repositories[@]}"; do +for _repo in "${main_repositories[@]}"; do for _arch in "${native_architectures[@]}"; do msg "Getting %s-%s database" "${_repo}" "${_arch}" diff --git a/db-list-unsigned-packages b/db-list-unsigned-packages index 7ea91e0..9a531d6 100755 --- a/db-list-unsigned-packages +++ b/db-list-unsigned-packages @@ -31,7 +31,7 @@ fi arch=$1 shift -for repo in "${repositories[@]}" +for repo in "${main_repositories[@]}" do db="${root_dir}/${repo}/os/${arch}/${repo}.db" [ -f "$db" ] && "$(dirname "$(readlink -e "$0")")/db-list-unsigned-packages.py" "$repo" "$@" < "$db" @@ -16,7 +16,7 @@ fi repos=() for staging_repo in "${staging_repos[@]##*/}"; do - if in_array "${staging_repo}" "${repositories[@]}"; then + if in_array "${staging_repo}" "${main_repositories[@]}"; then repos+=("${staging_repo}") fi done diff --git a/etc/dbscripts.d/gnu+linux.cfg b/etc/dbscripts.d/gnu+linux.cfg index b35c6e0..af798f3 100644 --- a/etc/dbscripts.d/gnu+linux.cfg +++ b/etc/dbscripts.d/gnu+linux.cfg @@ -14,7 +14,6 @@ derivative_native_repositories=() # Remote repositories multilib_repositories=("${main_multilib_repositories[@]}" "${derivative_multilib_repositories[@]}") main_repositories=("${main_native_repositories[@]}" "${derivative_native_repositories[@]}") -repositories=("${main_repositories[@]}") # legacy # Directories where packages are shared between repos # *relative to root_dir* diff --git a/etc/dbscripts.d/gnu+linux_arm_arch_legacy.cfg b/etc/dbscripts.d/gnu+linux_arm_arch_legacy.cfg index e1398c4..64f483e 100644 --- a/etc/dbscripts.d/gnu+linux_arm_arch_legacy.cfg +++ b/etc/dbscripts.d/gnu+linux_arm_arch_legacy.cfg @@ -14,7 +14,6 @@ derivative_native_repositories=('core' 'extra' 'community' 'aur' 'alarm') # Remote repositories multilib_repositories=("${main_multilib_repositories[@]}" "${derivative_multilib_repositories[@]}") main_repositories=("${main_native_repositories[@]}" "${derivative_native_repositories[@]}") -repositories=("${main_repositories[@]}") # legacy # Directories where packages are shared between repos # *relative to root_dir* diff --git a/etc/dbscripts.d/gnu+linux_x86_arch_legacy.cfg b/etc/dbscripts.d/gnu+linux_x86_arch_legacy.cfg index cb19160..5023ed9 100644 --- a/etc/dbscripts.d/gnu+linux_x86_arch_legacy.cfg +++ b/etc/dbscripts.d/gnu+linux_x86_arch_legacy.cfg @@ -16,7 +16,6 @@ derivative_native_repositories=('core' 'extra' 'testing' 'community' # Remote repositories multilib_repositories=("${main_multilib_repositories[@]}" "${derivative_multilib_repositories[@]}") main_repositories=("${main_native_repositories[@]}" "${derivative_native_repositories[@]}") -repositories=("${main_repositories[@]}") # legacy # Directories where packages are shared between repos # *relative to root_dir* diff --git a/share/db-functions b/share/db-functions index 421404c..1a452f9 100644 --- a/share/db-functions +++ b/share/db-functions @@ -359,7 +359,7 @@ check_pkgxbs() { [ $? -ge 1 ] && return 1 local repo="${2}" - in_array "${repo}" "${repositories[@]}" || return 1 + in_array "${repo}" "${main_repositories[@]}" || return 1 local xbsver="$(. "$(xbs releasepath "${_pkgbase}" "${repo}" "${_pkgarch}")/PKGBUILD"; get_full_version "${_pkgname}")" [ "${xbsver}" == "${_pkgver}" ] || return 1 @@ -424,7 +424,7 @@ check_pkgrepos() { local repo local arch - for repo in "${repositories[@]}"; do + for repo in "${main_repositories[@]}"; do for arch in "${native_architectures[@]}"; do [ -f "${root_dir}/${repo}/os/${arch}/${pkgname}-${pkgver}-${pkgarch}"${package_extension_suffixfile} ] && return 1 [ -f "${root_dir}/${repo}/os/${arch}/${pkgname}-${pkgver}-${pkgarch}"${package_extension_suffixfile}.sig ] && return 1 @@ -449,10 +449,10 @@ chk_license() { check_repo_permission() { local repo=$1 - [ ${#repositories[@]} -eq 0 ] && return 1 + [ ${#main_repositories[@]} -eq 0 ] && return 1 [ -z "${native_packages_pool}" ] && return 1 - in_array "${repo}" "${repositories[@]}" || return 1 + in_array "${repo}" "${main_repositories[@]}" || return 1 [ -w "${root_dir}/${native_packages_pool}" ] || return 1 diff --git a/test/lib/common.inc b/test/lib/common.inc index 9ccf1c8..5d405d1 100644 --- a/test/lib/common.inc +++ b/test/lib/common.inc @@ -59,11 +59,11 @@ setUp() { temporary_directory="$(mktemp -d /dev/shm/$(basename $0).XXXXXXXXXX)" #msg "Using ${temporary_directory}" - repositories=('core' 'extra' 'testing') + main_repositories=('core' 'extra' 'testing') native_packages_pool='pool/packages' mkdir -p "${temporary_directory}/"{ftp,tmp,staging,{package,source}-cleanup,svn-packages-{copy,repo}} - for r in ${repositories[@]}; do + for r in ${main_repositories[@]}; do mkdir -p "${temporary_directory}/staging/${r}" for a in ${native_architectures[@]} any; do mkdir -p "${temporary_directory}/ftp/${r}/os/${a}" @@ -87,7 +87,7 @@ setUp() { cat <<eot > "$(dirname ${BASH_SOURCE[0]})/../../etc/dbscripts.local.cfg" root_dir="${temporary_directory}/ftp" SVN_repository="file://${temporary_directory}/svn-packages-repo" - repositories=(${repositories[@]}) + main_repositories=(${main_repositories[@]}) native_packages_pool="${native_packages_pool}" cleanup_destination_directory="${temporary_directory}/package-cleanup" source_cleanup_destination_directory="${temporary_directory}/source-cleanup" |