Misc cleanups and performance improvements.
- There's no need to check rval for prop_dictionary_get_*, we are sure the objects are there at prop_dictionary_set_* time. - Avoid two chdir(2) calls per INSTALL/REMOVE run. - Avoid using access(2) to check for existence of INSTALL/REMOVE scripts, just try to run the executable directly and check for ENOENT.
This commit is contained in:
@ -292,11 +292,7 @@ show_pkg_deps_from_repolist(const char *pkgname)
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (!prop_dictionary_get_cstring_nocopy(pkgd,
|
||||
"version", &ver)) {
|
||||
rv = errno;
|
||||
break;
|
||||
}
|
||||
prop_dictionary_get_cstring_nocopy(pkgd, "version", &ver);
|
||||
printf("Repository %s [pkgver: %s]\n", rd->rp_uri, ver);
|
||||
(void)xbps_callback_array_iter_in_dict(pkgd,
|
||||
"run_depends", list_strings_sep_in_array, NULL);
|
||||
|
Reference in New Issue
Block a user