Verified Commit 63503bf8 authored by Morten Linderud's avatar Morten Linderud 🏄
Browse files

db-remove: Add debug package support



We check if there is a globfile match for a debug package when removing
the package from the main repository.

This also adds a guard to the usual package removal, and removing an
unused variable.
Signed-off-by: Morten Linderud's avatarMorten Linderud <morten@linderud.pw>
parent b856a600
......@@ -12,7 +12,6 @@ repo="$1"
arch="$2"
pkgbases=("${@:3}")
ftppath="$FTP_BASE/$repo/os"
vcsrepo="$repo-$arch"
if ! check_repo_permission "$repo"; then
......@@ -30,6 +29,7 @@ for tarch in "${tarches[@]}"; do
done
remove_pkgs=()
remove_debug_pkgs=()
for pkgbase in "${pkgbases[@]}"; do
msg "Removing %s from [%s]..." "$pkgbase" "$repo"
......@@ -42,9 +42,20 @@ for pkgbase in "${pkgbases[@]}"; do
warning "If it was a split package you have to remove the others yourself!"
remove_pkgs+=("$pkgbase")
fi
if is_globfile "${FTP_BASE}/${repo}-debug/os/${tarch}/${pkgbase}-debug"*; then
msg "Found debug package. Removing %s from [%s]..." "${pkgbase}-debug" "${repo}-debug"
remove_debug_pkgs+=("${pkgbase}-debug")
fi
done
for tarch in "${tarches[@]}"; do
arch_repo_modify remove "${repo}" "${tarch}" "${remove_pkgs[@]}"
if (( ${#remove_pkgs[@]} >= 1 )); then
arch_repo_modify remove "${repo}" "${tarch}" "${remove_pkgs[@]}"
fi
if (( ${#remove_debug_pkgs[@]} >= 1 )); then
arch_repo_modify remove "${repo}-debug" "${tarch}" "${remove_debug_pkgs[@]}"
fi
repo_unlock "$repo" "$tarch"
done
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment