Ignore executing install/remove scripts if XBPS_TARGET_ARCH is set.

Instead a two stage approach is necessary when packages for target arch
are installed:

	- XBPS_TARGET_ARCH=arch xbps-install foo <- only unpack
	- xbps-reconfigure -a <- configure natively or via an emulator
This commit is contained in:
Juan RP
2013-03-07 18:08:12 +01:00
parent fd7153fe5c
commit 5eddf04898
6 changed files with 63 additions and 26 deletions

View File

@ -48,6 +48,12 @@ xbps_pkg_exec_buffer(struct xbps_handle *xhp,
assert(pkgver);
assert(action);
if (xhp->target_arch) {
xbps_dbg_printf(xhp, "%s: not executing %s "
"install/remove action.\n", pkgver, action);
return 0;
}
if (strcmp(xhp->rootdir, "/") == 0) {
tmpdir = getenv("TMPDIR");
if (tmpdir == NULL)