xbps-rindex: [clean] the filesclean test now passes successfully.

This commit is contained in:
Juan RP 2013-11-03 11:15:56 +01:00
parent c06115af9a
commit 89c62c626c
2 changed files with 4 additions and 3 deletions

View File

@ -121,9 +121,9 @@ index_clean(struct xbps_handle *xhp, const char *repodir)
for (unsigned int x = 0; x < xbps_array_count(cbd.result); x++) {
xbps_array_get_cstring_nocopy(cbd.result, x, &keyname);
printf("index: removed entry %s\n", keyname);
xbps_dictionary_remove(idxfiles, keyname);
pkgname = xbps_pkg_name(keyname);
xbps_dictionary_remove(idx, pkgname);
xbps_dictionary_remove(idxfiles, keyname);
free(pkgname);
flush = true;
}

View File

@ -49,8 +49,9 @@ filesclean_body() {
cd ..
xbps-rindex -c some_repo
atf_check_equal $? 0
result=$(xbps-query --repository=some_repo -o \*|wc -l)
atf_check_equal ${result} 1
result=$(xbps-query --repository=some_repo -o \*)
test -z "${result}"
atf_check_equal $? 0
}
filesclean_cleanup() {