xbps_get_pkg_fulldeptree(): fix all known bugs and make it 50x faster.

faster: use a hash table with pkg names on the transaction dict,
 the process of collecting and sorting is now 50x faster or
 even more (kde5).

bugs: this now detects cyclic deps and returns with an appropropiate
 return value: ELOOP and ENOENT in xbps-query(1) --fulldeptree.
 Ping me if you need more details :-)

Close https://github.com/void-linux/xbps/issues/16
Close https://github.com/void-linux/xbps/issues/5
This commit is contained in:
Juan RP
2019-04-19 14:50:23 +02:00
committed by Duncaen
parent 5243eab739
commit 580a5ba29b
3 changed files with 127 additions and 127 deletions

View File

@@ -28,19 +28,19 @@
static const char expected_output[] =
"xbps-git-20130310_2\n"
"xbps-triggers-1.0_1\n"
"libxbps-git-20130310_2\n"
"confuse-2.7_2\n"
"proplib-0.6.3_1\n"
"libarchive-3.1.2_1\n"
"libfetch-2.34_1\n"
"bzip2-1.0.5_1\n"
"liblzma-5.0.4_3\n"
"expat-2.1.0_3\n"
"attr-2.4.46_5\n"
"proplib-0.6.3_1\n"
"libfetch-2.34_1\n"
"libssl-1.0.1e_3\n"
"zlib-1.2.7_1\n"
"glibc-2.20_1\n";
"glibc-2.20_1\n"
"xbps-triggers-1.0_1\n";
static const char expected_output_all[] =
"unexistent-pkg-0_1\n"

View File

@@ -61,8 +61,6 @@ cyclic_dep_full_head() {
}
cyclic_dep_full_body() {
atf_set "timeout" 5
atf_expect_timeout "Known bug: see https://github.com/voidlinux/xbps/issues/92"
mkdir some_repo
mkdir -p pkg_A/usr/bin pkg_B/usr/bin
cd some_repo
@@ -86,5 +84,5 @@ cyclic_dep_full_body() {
atf_init_test_cases() {
atf_add_test_case cyclic_dep_vpkg
atf_add_test_case cyclic_dep_vpkg2
#atf_add_test_case cyclic_dep_full
atf_add_test_case cyclic_dep_full
}