xbps_get_pkg_fulldeptree: detect pkgs depending on itself via virtual pkgs.

Reported by Duncan Overbrook.

Update NEWS with recent changes.
This commit is contained in:
Juan RP
2015-03-20 08:03:06 +01:00
parent 1eeaa99438
commit dc47dfd593
5 changed files with 83 additions and 34 deletions

View File

@@ -19,3 +19,4 @@ atf_test_program{name="preserve_files_test"}
atf_test_program{name="update_shlibs"}
atf_test_program{name="update_hold"}
atf_test_program{name="update_repolock"}
atf_test_program{name="cyclic_deps"}

View File

@@ -6,7 +6,7 @@ TESTSHELL = conf_files_test issue6_test issue18_test issue20_test remove_test
TESTSHELL+= replace_test installmode_test obsoletefiles_test
TESTSHELL+= issue31_test scripts_test incorrect_deps_test
TESTSHELL+= vpkg_test install_test preserve_files_test
TESTSHELL+= update_shlibs update_hold update_repolock
TESTSHELL+= update_shlibs update_hold update_repolock cyclic_deps
EXTRA_FILES = Kyuafile
include $(TOPDIR)/mk/test.mk

View File

@@ -0,0 +1,34 @@
#!/usr/bin/env atf-sh
#
atf_test_case cyclic_dep_vpkg
cyclic_dep_vpkg_head() {
atf_set "descr" "Tests for cyclic deps: pkg depends on a cyclic vpkg"
}
cyclic_dep_vpkg_body() {
mkdir some_repo
mkdir -p pkg_{A,B,C,D}/usr/bin
cd some_repo
xbps-create -A noarch -n A-1.0_1 -s "A pkg" --provides "libGL-7.11_1" --dependencies "libGL>=7.11" ../pkg_A
atf_check_equal $? 0
xbps-create -A noarch -n B-1.0_1 -s "B pkg" --dependencies "libGL>=7.11" ../pkg_B
atf_check_equal $? 0
xbps-create -A noarch -n C-1.0_1 -s "C pkg" --dependencies "B>=0" ../pkg_C
atf_check_equal $? 0
xbps-rindex -d -a $PWD/*.xbps
atf_check_equal $? 0
cd ..
xbps-install -r root --repository=$PWD/some_repo -dy C
atf_check_equal $? 0
xbps-query -r root --fulldeptree -x C
atf_check_equal $? 0
}
atf_init_test_cases() {
atf_add_test_case cyclic_dep_vpkg
}