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

test/db-move: Fix split package handling


Signed-off-by: Morten Linderud's avatarMorten Linderud <morten@linderud.pw>
parent 41758cf8
......@@ -112,11 +112,10 @@ for pkgbase in "${args[@]:2}"; do
add_pkgs+=("${FTP_BASE}/${PKGPOOL}/${pkgfile}")
remove_pkgs+=("${pkgname}")
done
debug_pkgpath=$(getpkgfile "${ftppath_debug_from}/${tarch}/${pkgbase}-debug-${pkgver}-${pkgarch}"${PKGEXTS})
debug_pkgfile="${debug_pkgpath##*/}"
if [[ -f ${debug_pkgpath} ]]; then
msg2 "Found debug package %s" "${pkgbase}-debug"
msg2 "Found debug package %s (%s)" "${pkgbase}-debug" "${tarch}"
ln -s "../../../${DEBUGPKGPOOL}/${debug_pkgfile}" "${ftppath_debug_to}/${tarch}/"
if [[ -f ${FTP_BASE}/${DEBUGPKGPOOL}/${debug_pkgfile}.sig ]]; then
ln -s "../../../${DEBUGPKGPOOL}/${debug_pkgfile}.sig" "${ftppath_debug_to}/${tarch}/"
......
......@@ -175,3 +175,21 @@ load ../lib/common
[ "$status" -ne 0 ]
[[ $output == *'notconfigured is not a valid'* ]]
}
@test "move split packages with debug" {
local arches=('x86_64')
local pkgs=('pkg-split-debuginfo')
local pkg
local pkgbase
local arch
for pkgbase in ${pkgs[@]}; do
releasePackage testing ${pkgbase}
done
db-update
db-move testing extra pkg-split-debuginfo
checkPackage extra pkg-split-debuginfo 1-1
checkPackage extra-debug pkg-split-debuginfo 1-1
}
pkgbase=pkg-split-debuginfo
pkgname=('pkg-split-debuginfo1' 'pkg-split-debuginfo2')
pkgver=1
pkgrel=1
pkgdesc="A split package called ${pkgbase} with debuginfo"
arch=('i686' 'x86_64')
url='http://www.archlinux.org/'
license=('GPL')
options=('strip' 'debug')
package_pkg-split-debuginfo1() {
install -D -m755 /bin/true ${pkgdir}/usr/bin/${pkgname}
install -D /dev/null "${pkgdir}"/usr/bin/hello1
install -D /dev/null "${pkgdir}"/../${pkgname}-debug/usr/lib/debug/usr/bin/hello1.debug
}
package_pkg-split-debuginfo2() {
install -D -m755 /bin/true ${pkgdir}/usr/bin/${pkgname}
install -D /dev/null "${pkgdir}"/usr/bin/hello2
install -D /dev/null "${pkgdir}"/../${pkgname}-debug/usr/lib/debug/usr/bin/hello2.debug
}
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