diff options
author | Luke Shumaker <lukeshu@parabola.nu> | 2018-07-15 21:54:26 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2018-08-20 19:54:30 -0400 |
commit | 6a7f4d2cadf02200802e4c36e6a1cb9ee75e7484 (patch) | |
tree | 447618e9bfee2ed6f706ba026673fefc83d8448d | |
parent | fa9b37edc298bdba896d4c44eecf02bfb54d84f8 (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 |