Verified Commit 7a2af00f authored by Morten Linderud's avatar Morten Linderud 🏄
Browse files

fixups


Signed-off-by: Morten Linderud's avatarMorten Linderud <morten@linderud.pw>
parent df487246
......@@ -52,10 +52,8 @@ for tarch in "${tarches[@]}"; do
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
......@@ -25,8 +25,8 @@ load ../lib/common
@test "remove debug package" {
local arches=('i686' 'x86_64')
local pkgs=('pkg-debuginfo')
local debug_pkgs=('pkg-debuginfo')
local pkgs=('pkg-simple-a' 'pkg-simple-b' 'pkg-split-a' 'pkg-split-b' 'pkg-simple-epoch' 'pkg-debuginfo' 'pkg-split-debuginfo')
local debug_pkgs=('pkg-debuginfo' 'pkg-split-debuginfo')
local pkgbase
local arch
......@@ -48,6 +48,32 @@ load ../lib/common
done
}
@test "remove specific debug package" {
local arches=('i686' 'x86_64')
local pkgs=('pkg-split-debuginfo')
local debug_pkgs=('pkg-split-debuginfo')
local pkgbase
local arch
for pkgbase in ${pkgs[@]}; do
releasePackage extra ${pkgbase}
done
db-update
# We might want to remove the specific debug package
# without removing the repo packages
for pkgbase in ${debug_pkgs[@]}; do
for arch in ${arches[@]}; do
db-remove extra-debug ${arch} ${pkgbase}-debug
done
done
for pkgbase in ${debug_pkgs[@]}; do
checkRemovedPackageDB extra-debug ${pkgbase}
done
}
@test "remove multiple packages" {
local arches=('i686' 'x86_64')
local pkgs=('pkg-simple-a' 'pkg-simple-b' 'pkg-split-a' 'pkg-split-b' 'pkg-simple-epoch')
......
......@@ -292,3 +292,21 @@ load ../lib/common
(( $status == 1 ))
[[ $output == *'was not built in a chroot'* ]]
}
@test "add split debug packages" {
local arches=('i686' 'x86_64')
local pkgs=('pkg-split-debuginfo')
local pkg
local pkgbase
local arch
for pkgbase in ${pkgs[@]}; do
releasePackage extra ${pkgbase}
done
db-update
for pkgbase in ${pkgs[@]}; do
checkPackage extra-debug ${pkgbase} 1-1
done
}
......@@ -186,3 +186,29 @@ __checkRepoRemovedPackage() {
[ ! -f ${CLEANUP_DESTDIR}/${pkgfilea} ]
[ -f ${CLEANUP_DESTDIR}/${pkgfileb} ]
}
@test "cleanup debug packages" {
local arches=('i686' 'x86_64')
local pkgs=('pkg-debuginfo' 'pkg-split-debuginfo')
local pkgbase
local arch
for pkgbase in ${pkgs[@]}; do
releasePackage extra ${pkgbase}
done
db-update
for arch in ${arches[@]}; do
db-remove extra ${arch} pkg-debuginfo
done
ftpdir-cleanup
checkRemovedPackage extra 'pkg-debuginfo'
for arch in ${arches[@]}; do
__checkRepoRemovedPackage extra 'pkg-debuginfo' ${arch}
done
checkPackage extra pkg-split-debuginfo 1-1
}
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