From ed711fe8b9c2a21cd437a57617ee6c3559017c25 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 13 Aug 2009 17:11:23 +0200 Subject: [PATCH] xbps_find_pkg_installed_from_plist: use xbps_prepare_regpkgdb_dict(). --HG-- extra : convert_revision : 0f6f5764049f176abaa94585b14e9bdfc9f99b78 --- lib/plist.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/plist.c b/lib/plist.c index 15f164ae7a..ff5b4b3c0b 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -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;