libxbps: pass xhp->conffile as last argument when execing INSTALL/REMOVE scripts.
This commit is contained in:
parent
a8f2f04d9f
commit
70e95786dc
@ -56,7 +56,7 @@
|
||||
*/
|
||||
#define XBPS_PKGINDEX_VERSION "1.3"
|
||||
|
||||
#define XBPS_API_VERSION "20111215"
|
||||
#define XBPS_API_VERSION "20111215-1"
|
||||
#define XBPS_VERSION "0.11.0"
|
||||
|
||||
/**
|
||||
|
@ -140,7 +140,8 @@ xbps_configure_pkg(const char *pkgname,
|
||||
|
||||
if (access(buf, X_OK) == 0) {
|
||||
if (xbps_file_exec(buf, "post",
|
||||
pkgname, lver, update ? "yes" : "no", NULL) != 0) {
|
||||
pkgname, lver, update ? "yes" : "no",
|
||||
xhp->conffile, NULL) != 0) {
|
||||
xbps_set_cb_state(XBPS_STATE_CONFIGURE_FAIL, errno,
|
||||
pkgname, lver,
|
||||
"%s: [configure] INSTALL script failed to execute "
|
||||
|
@ -202,7 +202,8 @@ xbps_purge_pkg(const char *pkgname, bool check_state)
|
||||
return rv;
|
||||
}
|
||||
if (access(buf, X_OK) == 0) {
|
||||
rv = xbps_file_exec(buf, "purge", pkgname, version, "no", NULL);
|
||||
rv = xbps_file_exec(buf, "purge", pkgname, version,
|
||||
"no", xhp->conffile, NULL);
|
||||
if (rv != 0) {
|
||||
free(buf);
|
||||
if (errno && errno != ENOENT) {
|
||||
|
@ -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 "
|
||||
|
@ -257,7 +257,8 @@ unpack_archive(prop_dictionary_t pkg_repod, struct archive *ar)
|
||||
goto out;
|
||||
}
|
||||
rv = xbps_file_exec(buf, "pre",
|
||||
pkgname, version, update ? "yes" : "no", NULL);
|
||||
pkgname, version, update ? "yes" : "no",
|
||||
xhp->conffile, NULL);
|
||||
free(buf);
|
||||
if (rv != 0) {
|
||||
xbps_set_cb_state(XBPS_STATE_UNPACK_FAIL,
|
||||
|
Loading…
x
Reference in New Issue
Block a user