libxbps: cache regpkgdb just when it's needed not via xbps_init().

This commit is contained in:
Juan RP
2011-12-22 12:56:56 +01:00
parent 8fd5253e31
commit b232ca1815
6 changed files with 29 additions and 16 deletions

View File

@ -56,6 +56,11 @@ xbps_configure_packages(void)
int rv = 0;
xhp = xbps_handle_get();
if ((rv = xbps_regpkgdb_dictionary_init(xhp)) != 0) {
xbps_dbg_printf("%s: couldn't initialize "
"regpkgdb: %s\n", strerror(rv));
return rv;
}
iter = xbps_array_iter_from_dict(xhp->regpkgdb_dictionary, "packages");
if (iter == NULL)
return errno;