xbps-bin: simplify and make 'check' target work after regpkgdb flush changes.

This commit is contained in:
Juan RP
2011-12-29 16:43:52 +01:00
parent bae664c639
commit e22ba9a972
7 changed files with 52 additions and 96 deletions

View File

@@ -45,21 +45,17 @@
* returns 0 if test ran successfully, 1 otherwise and -1 on error.
*/
int
check_pkg_symlinks(prop_dictionary_t pkgd_regpkgdb,
prop_dictionary_t pkg_propsd,
prop_dictionary_t pkg_filesd)
check_pkg_symlinks(const char *pkgname, void *arg)
{
const struct xbps_handle *xhp = xbps_handle_get();
prop_array_t array;
prop_object_t obj;
prop_object_iterator_t iter;
const char *pkgname, *file, *tgt = NULL;
prop_dictionary_t pkg_filesd = arg;
const char *file, *tgt = NULL;
char *path, buf[PATH_MAX];
bool broken = false, test_broken = false;
(void)pkg_propsd;
prop_dictionary_get_cstring_nocopy(pkgd_regpkgdb, "pkgname", &pkgname);
array = prop_dictionary_get(pkg_filesd, "links");
if ((prop_object_type(array) == PROP_TYPE_ARRAY) &&
prop_array_count(array) > 0) {