alternatives: do not remove symlinks if provider != target pkg.

This fixes the keep_provider_on_update test case, submitted
by @st3r4g via #219.

While checking for obsoletes make sure current provider
also matches the current target pkg.

Fixes #219
This commit is contained in:
Juan RP
2020-02-07 09:16:57 +01:00
parent 86ce5a2084
commit 94b56d7539
2 changed files with 18 additions and 10 deletions

View File

@@ -809,8 +809,6 @@ keep_provider_on_update_head() {
}
keep_provider_on_update_body() {
atf_expect_fail "https://github.com/void-linux/xbps/issues/219"
mkdir -p tar/usr/bin/ bsdtar/usr/bin
touch tar/usr/bin/gtar bsdtar/usr/bin/bsdtar
mkdir repo
@@ -837,7 +835,7 @@ keep_provider_on_update_body() {
atf_check_equal $? 0
cd ..
xbps-install -r root --repo=repo -yu
xbps-install -r root --repo=repo -yud
atf_check_equal $? 0
link=$(readlink -v root/usr/bin/tar)