diff options
author | Luke Shumaker <lukeshu@parabola.nu> | 2018-07-15 21:54:26 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2018-10-07 19:00:51 -0400 |
commit | b4b486925c5be2f1c666d46243866a13b2bc0329 (patch) | |
tree | fcba5251a12451990a07a1c95af552be70981d41 | |
parent | a02e0a53f88c1723aa6e1bf95731b2d57c0a7b0a (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-x | db-remove | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -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 |