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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user