libxbps: fixed regression executing "pre-remove" action in installed pkgs.

This commit is contained in:
Juan RP 2012-12-28 10:42:13 +01:00
parent 492bfeb560
commit 0f22579a34
2 changed files with 5 additions and 3 deletions

3
NEWS
View File

@ -1,5 +1,8 @@
xbps-0.20 (???):
* libxbps: fixed a stupid typo that made it to skip executing the
"pre-remove" action in installed packages.
* xbps-create(8): new long options: --shlib-provides and --shlib-requires,
to add list of required and provided shared libraries in a package.

View File

@ -233,8 +233,6 @@ xbps_remove_pkg(struct xbps_handle *xhp,
if (!update)
xbps_set_cb_state(xhp, XBPS_STATE_REMOVE, 0, pkgname, version, NULL);
pkgver = xbps_xasprintf("%s-%s", pkgname, version);
if (chdir(xhp->rootdir) == -1) {
rv = errno;
xbps_set_cb_state(xhp, XBPS_STATE_REMOVE_FAIL,
@ -259,7 +257,8 @@ xbps_remove_pkg(struct xbps_handle *xhp,
* Run the pre remove action.
*/
if (pkgd) {
rv = xbps_pkg_exec_script(xhp, pkgd, "remove", "pre", update);
rv = xbps_pkg_exec_script(xhp, pkgd, "remove-script",
"pre", update);
if (rv != 0) {
xbps_set_cb_state(xhp, XBPS_STATE_REMOVE_FAIL,
errno, pkgname, version,