summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2015-09-23 23:22:45 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2015-09-23 23:22:45 -0300
commit975660674e48954b1f96cb489a232181b85a4928 (patch)
treea0360766d2db20d982dceb69484fe2b92f3e77e6
parentb2a6a10a14459715cee3d2cd49db9244c40bf969 (diff)
remove deprecated architectures variables
-rwxr-xr-xcreate-repo2
-rwxr-xr-xcron-jobs/ftpdir-cleanup4
-rwxr-xr-xcron-jobs/sourceballs6
-rwxr-xr-xdb-check-nonfree8
-rwxr-xr-xdb-cleanup2
-rwxr-xr-xdb-move14
-rwxr-xr-xdb-remove2
-rwxr-xr-xdb-repo-add2
-rwxr-xr-xdb-repo-remove2
-rwxr-xr-xdb-update8
-rw-r--r--etc/dbscripts.d/gnu+linux.cfg1
-rw-r--r--etc/dbscripts.d/gnu+linux_arm_arch_legacy.cfg1
-rw-r--r--etc/dbscripts.d/gnu+linux_x86_arch_legacy.cfg1
-rwxr-xr-xmkrepo2
-rw-r--r--share/db-functions6
-rw-r--r--test/lib/common.inc2
16 files changed, 30 insertions, 33 deletions
diff --git a/create-repo b/create-repo
index 2d82db0..89233c7 100755
--- a/create-repo
+++ b/create-repo
@@ -12,7 +12,7 @@ fi
msg "Creating repos..."
for _repo in "$@"; do
msg2 "Creating [%s]" "${_repo}"
- for _arch in "${architectures[@]}"; do
+ for _arch in "${native_architectures[@]}"; do
mkdir -p "${root_dir}/${_repo}/os/${_arch}" || \
error "Failed creating %s dir" "${_arch}"
done
diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup
index 43d5236..ad33b19 100755
--- a/cron-jobs/ftpdir-cleanup
+++ b/cron-jobs/ftpdir-cleanup
@@ -25,7 +25,7 @@ clean_pkg() {
"${cleanup_dryrun}" && warning 'dry run mode is active'
for repo in "${repositories[@]}"; do
- for arch in "${architectures[@]}"; do
+ for arch in "${native_architectures[@]}"; do
if [ ! -f "${root_dir}/${repo}/os/${arch}/${repo}${database_extension_suffixfile}" ]; then
continue
fi
@@ -80,7 +80,7 @@ if [ ${#old_pkgs[@]} -ge 1 ]; then
fi
for repo in "${repositories[@]}"; do
- for arch in "${architectures[@]}"; do
+ for arch in "${native_architectures[@]}"; do
repo_unlock "${repo}" "${arch}"
done
done
diff --git a/cron-jobs/sourceballs b/cron-jobs/sourceballs
index efa9f09..2e7b7be 100755
--- a/cron-jobs/sourceballs
+++ b/cron-jobs/sourceballs
@@ -8,7 +8,7 @@ pushd "${work_directory}" >/dev/null
script_lock
for repo in "${repositories[@]}"; do
- for arch in "${architectures[@]}"; do
+ for arch in "${native_architectures[@]}"; do
repo_lock "${repo}" "${arch}" || exit 1
done
done
@@ -19,7 +19,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 arch in "${architectures[@]}"; 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
continue
@@ -40,7 +40,7 @@ for repo in "${repositories[@]}"; do
done
for repo in "${repositories[@]}"; do
- for arch in "${architectures[@]}"; do
+ for arch in "${native_architectures[@]}"; do
repo_unlock "${repo}" "${arch}"
done
done
diff --git a/db-check-nonfree b/db-check-nonfree
index 0da62cb..75c9626 100755
--- a/db-check-nonfree
+++ b/db-check-nonfree
@@ -8,9 +8,9 @@ if [ $# -ge 1 ]; then
exit 1
fi
-# TODO: this might lock too much (architectures)
+# TODO: this might lock too much (native_architectures)
for repo in "${repos[@]}"; do
- for pkgarch in "${architectures[@]}"; do
+ for pkgarch in "${native_architectures[@]}"; do
repo_lock "${repo}" "${pkgarch}" || exit 1
done
done
@@ -18,7 +18,7 @@ done
msg "Check nonfree in repo:"
nonfree=($(cut -d: -f1 "${blacklist_file}" | sort -u))
for repo in "${derivative_native_repositories[@]}"; do
- for pkgarch in "${architectures[@]}"; do
+ for pkgarch in "${native_architectures[@]}"; do
msg2 "%s %s" "$repo" "$pkgarch"
if [ ! -f "${root_dir}/${repo}/os/${pkgarch}/${repo}${database_extension_suffixfile}" ]; then
continue
@@ -40,7 +40,7 @@ for repo in "${derivative_native_repositories[@]}"; do
done
for repo in "${repos[@]}"; do
- for pkgarch in "${architectures[@]}"; do
+ for pkgarch in "${native_architectures[@]}"; do
repo_unlock "${repo}" "${pkgarch}"
done
done
diff --git a/db-cleanup b/db-cleanup
index 9e9a21f..432f3f2 100755
--- a/db-cleanup
+++ b/db-cleanup
@@ -32,7 +32,7 @@ filter=$(mktemp -t "${0##*/}.XXXXXXXXXX")
trap "rm -f -- $(printf %q "$filter")" EXIT
for _repo in "${repositories[@]}"; do
- for _arch in "${architectures[@]}"; do
+ for _arch in "${native_architectures[@]}"; do
msg "Getting %s-%s database" "${_repo}" "${_arch}"
dbfile="${root_dir}/${_repo}/os/${_arch}/${_repo}${database_extension_suffixfile}"
diff --git a/db-move b/db-move
index 4c80d73..211e191 100755
--- a/db-move
+++ b/db-move
@@ -18,15 +18,15 @@ if ! check_repo_permission "$repo_to" || ! check_repo_permission "$repo_from"; t
die "You don't have permission to move packages from %s to %s" "${repo_from}" "${repo_to}"
fi
-# TODO: this might lock too much (architectures)
-for pkgarch in "${architectures[@]}"; do
+# TODO: this might lock too much (native_architectures)
+for pkgarch in "${native_architectures[@]}"; do
repo_lock "${repo_to}" "${pkgarch}" || exit 1
repo_lock "${repo_from}" "${pkgarch}" || exit 1
done
# First loop is to check that all necessary files exist
for pkgbase in "${args[@]:2}"; do
- for pkgarch in "${architectures[@]}" 'any'; do
+ for pkgarch in "${native_architectures[@]}" 'any'; do
xbsrepo_from="$(xbs releasepath "${pkgbase}" "${repo_from}" "${pkgarch}")"
if [ -r "${xbsrepo_from}/PKGBUILD" ]; then
pkgnames=($(. "${xbsrepo_from}/PKGBUILD"; echo "${pkgname[@]}"))
@@ -40,7 +40,7 @@ for pkgbase in "${args[@]:2}"; do
fi
if [ "${pkgarch}" == 'any' ]; then
- tarches=("${architectures[@]}")
+ tarches=("${native_architectures[@]}")
else
tarches=("${pkgarch}")
fi
@@ -68,7 +68,7 @@ for pkgbase in "${args[@]:2}"; do
xbsrepo_to="$(xbs releasepath "$pkgbase" "$repo_to" "$pkgarch")"
if true; then # to add an indent level to make merging easier
if [ "${pkgarch}" == 'any' ]; then
- tarches=("${architectures[@]}")
+ tarches=("${native_architectures[@]}")
else
tarches=("${pkgarch}")
fi
@@ -93,14 +93,14 @@ for pkgbase in "${args[@]:2}"; do
done
done
-for tarch in "${architectures[@]}"; do
+for tarch in "${native_architectures[@]}"; do
if [ -n "${add_pkgs[${tarch}]}" ]; then
arch_repo_add "${repo_to}" "${tarch}" ${add_pkgs[${tarch}]}
arch_repo_remove "${repo_from}" "${tarch}" ${remove_pkgs[${tarch}]}
fi
done
-for pkgarch in "${architectures[@]}"; do
+for pkgarch in "${native_architectures[@]}"; do
repo_unlock "${repo_from}" "${pkgarch}"
repo_unlock "${repo_to}" "${pkgarch}"
done
diff --git a/db-remove b/db-remove
index 24a6742..a4adc23 100755
--- a/db-remove
+++ b/db-remove
@@ -17,7 +17,7 @@ if ! check_repo_permission "$repo"; then
fi
if [ "$arch" == "any" ]; then
- tarches=("${architectures[@]}")
+ tarches=("${native_architectures[@]}")
else
tarches=("$arch")
fi
diff --git a/db-repo-add b/db-repo-add
index 4ba0d2c..41dd84a 100755
--- a/db-repo-add
+++ b/db-repo-add
@@ -19,7 +19,7 @@ if ! check_repo_permission "$repo"; then
fi
if [ "$arch" == "any" ]; then
- tarches=("${architectures[@]}")
+ tarches=("${native_architectures[@]}")
else
tarches=("$arch")
fi
diff --git a/db-repo-remove b/db-repo-remove
index 5397437..c0bd088 100755
--- a/db-repo-remove
+++ b/db-repo-remove
@@ -19,7 +19,7 @@ if ! check_repo_permission "$repo"; then
fi
if [ "$arch" == "any" ]; then
- tarches=("${architectures[@]}")
+ tarches=("${native_architectures[@]}")
else
tarches=("$arch")
fi
diff --git a/db-update b/db-update
index e3281c0..60f3142 100755
--- a/db-update
+++ b/db-update
@@ -21,9 +21,9 @@ for staging_repo in "${staging_repos[@]##*/}"; do
fi
done
-# TODO: this might lock too much (architectures)
+# TODO: this might lock too much (native_architectures)
for repo in "${repos[@]}"; do
- for pkgarch in "${architectures[@]}"; do
+ for pkgarch in "${native_architectures[@]}"; do
repo_lock "${repo}" "${pkgarch}" || exit 1
done
done
@@ -59,7 +59,7 @@ dirs=()
for repo in "${repos[@]}"; do
msg "Updating [%s]..." "${repo}"
any_pkgs=($(getpkgfiles "${staging_directory}/${repo}/"*-any${package_extension_suffixfile} 2>/dev/null))
- for pkgarch in "${architectures[@]}"; do
+ for pkgarch in "${native_architectures[@]}"; do
add_dirs=()
add_pkgs=()
arch_pkgs=($(getpkgfiles "${staging_directory}/${repo}/"*-"${pkgarch}"${package_extension_suffixfile} 2>/dev/null))
@@ -93,7 +93,7 @@ for repo in "${repos[@]}"; do
done
for repo in "${repos[@]}"; do
- for pkgarch in "${architectures[@]}"; do
+ for pkgarch in "${native_architectures[@]}"; do
repo_unlock "${repo}" "${pkgarch}"
done
done
diff --git a/etc/dbscripts.d/gnu+linux.cfg b/etc/dbscripts.d/gnu+linux.cfg
index 491ffab..c9fce98 100644
--- a/etc/dbscripts.d/gnu+linux.cfg
+++ b/etc/dbscripts.d/gnu+linux.cfg
@@ -30,7 +30,6 @@ sources_pools=(${native_sources_pools[@]} ${derivative_sources_pools[@]}) # lega
multilib_architectures=()
native_architectures=('mips64el')
-architectures=("${native_architectures[@]}" "${multilib_architectures[@]}") # legacy
# sync for derivative distribution (db-sync)
sync_domain=
diff --git a/etc/dbscripts.d/gnu+linux_arm_arch_legacy.cfg b/etc/dbscripts.d/gnu+linux_arm_arch_legacy.cfg
index cc2c2d7..eddd69e 100644
--- a/etc/dbscripts.d/gnu+linux_arm_arch_legacy.cfg
+++ b/etc/dbscripts.d/gnu+linux_arm_arch_legacy.cfg
@@ -30,7 +30,6 @@ sources_pools=(${native_sources_pools[@]} ${derivative_sources_pools[@]}) # lega
multilib_architectures=()
native_architectures=('arm' 'armv6h' 'armv7h' 'aarch64')
-architectures=("${native_architectures[@]}" "${multilib_architectures[@]}") # legacy
# sync for derivative distribution (db-sync)
sync_domain="ftp.halifax.rwth-aachen.de"
diff --git a/etc/dbscripts.d/gnu+linux_x86_arch_legacy.cfg b/etc/dbscripts.d/gnu+linux_x86_arch_legacy.cfg
index b75c979..dea4e21 100644
--- a/etc/dbscripts.d/gnu+linux_x86_arch_legacy.cfg
+++ b/etc/dbscripts.d/gnu+linux_x86_arch_legacy.cfg
@@ -33,7 +33,6 @@ sources_pools=(${native_sources_pools[@]} ${derivative_sources_pools[@]}) # lega
multilib_architectures=('x86_64')
native_architectures=('i686'
"${multilib_architectures[@]}") # legacy (multilib only)
-architectures=("${native_architectures[@]}" "${native_architectures[@]}") # legacy
# sync for derivative distribution (db-sync)
#sync_domain="sync_domains.kernel.org"
diff --git a/mkrepo b/mkrepo
index 7d6622e..06708b9 100755
--- a/mkrepo
+++ b/mkrepo
@@ -7,7 +7,7 @@ source "$(dirname "$(readlink -e "$0")")/etc/dbscripts.cfg"
for repo in "$@"; do
echo ":: Creating [$repo]"
- for arch in "${architectures[@]}"; do
+ for arch in "${native_architectures[@]}"; do
mkdir -pv "${root_dir}/${repo}/os/${arch}"
done
done
diff --git a/share/db-functions b/share/db-functions
index ac7e6ef..af99037 100644
--- a/share/db-functions
+++ b/share/db-functions
@@ -338,7 +338,7 @@ check_pkgfile() {
local pkgarch="$(getpkgarch "${pkgfile}")"
[ $? -ge 1 ] && return 1
- in_array "${pkgarch}" "${architectures[@]}" 'any' || return 1
+ in_array "${pkgarch}" "${native_architectures[@]}" 'any' || return 1
if echo "${pkgfile##*/}" | grep -q "${pkgname}-${pkgver}-${pkgarch}"; then
return 0
@@ -425,7 +425,7 @@ check_pkgrepos() {
local repo
local arch
for repo in "${repositories[@]}"; do
- for arch in "${architectures[@]}"; 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
[ -f "${root_dir}/${repo}/os/${arch}/${pkgfile##*/}" ] && return 1
@@ -457,7 +457,7 @@ check_repo_permission() {
[ -w "${root_dir}/${packages_pool}" ] || return 1
local arch
- for arch in "${architectures[@]}"; do
+ for arch in "${native_architectures[@]}"; do
local dir="${root_dir}/${repo}/os/${arch}/"
[ -w "${dir}" ] || return 1
[ -f "${dir}${repo}"${database_extension_suffixfile} -a ! -w "${dir}${repo}"${database_extension_suffixfile} ] && return 1
diff --git a/test/lib/common.inc b/test/lib/common.inc
index 19caf80..f43d531 100644
--- a/test/lib/common.inc
+++ b/test/lib/common.inc
@@ -65,7 +65,7 @@ setUp() {
for r in ${repositories[@]}; do
mkdir -p "${temporary_directory}/staging/${r}"
- for a in ${architectures[@]} any; do
+ for a in ${native_architectures[@]} any; do
mkdir -p "${temporary_directory}/ftp/${r}/os/${a}"
done
done