Fix pkg symlink removal introduced in the two phase package removal feature.
This commit is contained in:
@@ -67,7 +67,38 @@ remove_symlinks_body() {
|
||||
atf_check_equal $rv 0
|
||||
}
|
||||
|
||||
# 3rd test: make sure that symlinks to the rootfs are also removed.
|
||||
atf_test_case remove_symlinks_from_root
|
||||
|
||||
remove_symlinks_from_root_head() {
|
||||
atf_set "descr" "Tests for package removal: symlink from root test"
|
||||
}
|
||||
|
||||
remove_symlinks_from_root_body() {
|
||||
mkdir some_repo
|
||||
mkdir -p pkg_A/bin
|
||||
ln -sf /bin/bash pkg_A/bin/bash
|
||||
ln -sf /bin/bash pkg_A/bin/sh
|
||||
|
||||
cd some_repo
|
||||
xbps-create -A noarch -n A-1.0_1 -s "A pkg" ../pkg_A
|
||||
atf_check_equal $? 0
|
||||
xbps-rindex -a *.xbps
|
||||
atf_check_equal $? 0
|
||||
cd ..
|
||||
xbps-install -r root -C null.conf --repository=$PWD/some_repo -y A
|
||||
atf_check_equal $? 0
|
||||
xbps-remove -r root -Ryv A
|
||||
atf_check_equal $? 0
|
||||
rv=0
|
||||
if [ -h root/bin/bash -o -h root/bin/sh ]; then
|
||||
rv=1
|
||||
fi
|
||||
atf_check_equal $rv 0
|
||||
}
|
||||
|
||||
atf_init_test_cases() {
|
||||
atf_add_test_case keep_base_symlinks
|
||||
atf_add_test_case remove_symlinks
|
||||
atf_add_test_case remove_symlinks_from_root
|
||||
}
|
||||
|
Reference in New Issue
Block a user