summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@parabola.nu>2018-07-15 21:54:26 -0400
committerLuke Shumaker <lukeshu@parabola.nu>2018-10-07 19:00:51 -0400
commitb4b486925c5be2f1c666d46243866a13b2bc0329 (patch)
treefcba5251a12451990a07a1c95af552be70981d41
parenta02e0a53f88c1723aa6e1bf95731b2d57c0a7b0a (diff)
db-remove: Don't assume that the list of pkgnames is the same for every tarch
Consider glibc, for which pkgname=(glibc lib32-glibc). It wouldn't include lib32-glibc on any architecture other than x86_64.
-rwxr-xr-xdb-remove13
1 files changed, 7 insertions, 6 deletions
diff --git a/db-remove b/db-remove
index 65d7e85..4748884 100755
--- a/db-remove
+++ b/db-remove
@@ -24,19 +24,20 @@ fi
for tarch in "${tarches[@]}"; do
repo_lock "$repo" "$tarch" || exit 1
+ declare -a remove_pkgs_$tarch
done
-
-remove_pkgs=()
for pkgbase in "${pkgbases[@]}"; do
msg "Removing %s from [%s]..." "$pkgbase" "$repo"
-
- mapfile -t pkgnames < <(arch_expac_pkgbase "$repo" "${tarches[0]}" '%n' "$pkgbase")
- remove_pkgs+=("${pkgnames[@]}")
-
+ for tarch in "${tarches[@]}"; do
+ declare -n remove_pkgs="remove_pkgs_${tarch}"
+ mapfile -t pkgnames < <(arch_expac_pkgbase "$repo" "$tarch" '%n' "$pkgbase")
+ remove_pkgs+=("${pkgnames[@]}")
+ done
vcs_remove "$repo" "$arch" "$pkgbase"
done
for tarch in "${tarches[@]}"; do
+ declare -n remove_pkgs="remove_pkgs_${tarch}"
arch_repo_modify remove "${repo}" "${tarch}" "${remove_pkgs[@]}"
repo_unlock "$repo" "$tarch"
done