xbps_{configure,remove}_pkg: do not use meta cache when executing scripts.

This fixes executing INSTALL/REMOVE scripts with the right version currently
installed, i.e kernel post-install failed to execute correctly its kernel
hooks due to passing a wrong version.
This commit is contained in:
Juan RP
2012-11-26 23:25:41 +01:00
parent 25612870f0
commit 85c0641cc8
2 changed files with 10 additions and 2 deletions

View File

@ -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);