xbps_find_pkg_installed_from_plist: use xbps_prepare_regpkgdb_dict().

--HG--
extra : convert_revision : 0f6f5764049f176abaa94585b14e9bdfc9f99b78
This commit is contained in:
Juan RP 2009-08-13 17:11:23 +02:00
parent 0d04547576
commit ed711fe8b9

View file

@ -192,13 +192,14 @@ xbps_find_pkg_from_plist(const char *plist, const char *pkgname)
prop_dictionary_t
xbps_find_pkg_installed_from_plist(const char *pkgname)
{
prop_dictionary_t d, pkgd;
pkg_state_t state = 0;
prop_dictionary_t pkgd;
if (regpkgdb_initialized == false)
d = xbps_prepare_regpkgdb_dict();
if (d == NULL)
return NULL;
pkgd = xbps_find_pkg_in_dict(regpkgdb_dict, "packages", pkgname);
pkgd = xbps_find_pkg_in_dict(d, "packages", pkgname);
if (pkgd == NULL)
return NULL;