libxbps: pass xhp->conffile as last argument when execing INSTALL/REMOVE scripts.

This commit is contained in:
Juan RP
2011-12-15 12:24:59 +01:00
parent a8f2f04d9f
commit 70e95786dc
5 changed files with 10 additions and 6 deletions

View File

@@ -240,7 +240,7 @@ xbps_remove_pkg(const char *pkgname, const char *version, bool update)
if (access(buf, X_OK) == 0) {
rmfile_exists = true;
if (xbps_file_exec(buf, "pre", pkgname, version,
update ? "yes" : "no", NULL) != 0) {
update ? "yes" : "no", xhp->conffile, NULL) != 0) {
xbps_set_cb_state(XBPS_STATE_REMOVE_FAIL,
errno, pkgname, version,
"%s: [remove] REMOVE script failed to "
@@ -307,7 +307,8 @@ xbps_remove_pkg(const char *pkgname, const char *version, bool update)
* updating the package.
*/
if (rmfile_exists &&
(xbps_file_exec(buf, "post", pkgname, version, "no", NULL) != 0)) {
(xbps_file_exec(buf, "post", pkgname, version, "no",
xhp->conffile, NULL) != 0)) {
xbps_set_cb_state(XBPS_STATE_REMOVE_FAIL,
errno, pkgname, version,
"%s: [remove] REMOVE script failed to execute "