For INSTALL/REMOVE scripts use xbps_file_chdir_exec().

This will chroot() to rootdir and removes many chroot() commands
from those scripts.

--HG--
extra : convert_revision : 4845df1949996da1bcd2776fcc50c3d0a00b451b
This commit is contained in:
Juan RP
2009-04-08 03:20:13 +02:00
parent fe27e6dc44
commit 32e81e7555
2 changed files with 7 additions and 13 deletions

View File

@@ -176,7 +176,7 @@ unpack_archive_fini(struct archive *ar, prop_dictionary_t pkg)
break;
}
if ((rv = xbps_file_exec(buf, rootdir, "pre",
if ((rv = xbps_file_chdir_exec(rootdir, buf, "pre",
pkgname, version, NULL)) != 0) {
printf("%s: preinst action target error %s\n",
pkgname, strerror(errno));
@@ -219,7 +219,7 @@ unpack_archive_fini(struct archive *ar, prop_dictionary_t pkg)
* Run the post installaction action target, if package
* contains the script.
*/
if ((rv = xbps_file_exec(buf, rootdir, "post",
if ((rv = xbps_file_chdir_exec(rootdir, buf, "post",
pkgname, version, NULL)) != 0) {
printf("%s: postinst action target error %s\n",
pkgname, strerror(errno));