diff --git a/lib/package_configure.c b/lib/package_configure.c index 7294f74e..9e0d4a88 100644 --- a/lib/package_configure.c +++ b/lib/package_configure.c @@ -79,6 +79,7 @@ xbps_configure_pkg(struct xbps_handle *xhp, { prop_dictionary_t pkgd, pkgmetad; const char *version, *pkgver; + char *plist; int rv = 0; pkg_state_t state = 0; @@ -110,7 +111,10 @@ xbps_configure_pkg(struct xbps_handle *xhp, xbps_set_cb_state(xhp, XBPS_STATE_CONFIGURE, 0, pkgname, version, NULL); - pkgmetad = xbps_metadir_get_pkgd(xhp, pkgname); + /* internalize pkg dictionary from metadir */ + plist = xbps_xasprintf("%s/.%s.plist", xhp->metadir, pkgname); + pkgmetad = prop_dictionary_internalize_from_file(plist); + free(plist); assert(pkgmetad); rv = xbps_pkg_exec_script(xhp, pkgmetad, "install-script", "post", update); diff --git a/lib/package_remove.c b/lib/package_remove.c index 53e92763..81cd12c4 100644 --- a/lib/package_remove.c +++ b/lib/package_remove.c @@ -241,7 +241,11 @@ xbps_remove_pkg(struct xbps_handle *xhp, pkgver, xhp->rootdir, strerror(rv)); goto out; } - pkgd = xbps_metadir_get_pkgd(xhp, pkgname); + + /* internalize pkg dictionary from metadir */ + buf = xbps_xasprintf("%s/.%s.plist", xhp->metadir, pkgname); + pkgd = prop_dictionary_internalize_from_file(buf); + free(buf); if (pkgd == NULL) xbps_dbg_printf(xhp, "WARNING: metaplist for %s " "doesn't exist!\n", pkgname);