summaryrefslogtreecommitdiff
path: root/lib/libalpm/trans.c
diff options
context:
space:
mode:
authorJonathan Conder <j@skurvy.no-ip.org>2010-08-19 00:07:21 +1200
committerDan McGee <dan@archlinux.org>2010-08-27 11:19:15 -0500
commit693ebbd16bc1560ec3ec166d9944e44583141259 (patch)
treee7359349ae7cf41c4d296b64208053ff1eafcb05 /lib/libalpm/trans.c
parent0223a028e0835b6e09e2654e62ce5fd462370ffb (diff)
downloadpacman-693ebbd16bc1560ec3ec166d9944e44583141259.tar.xz
use execv to avoid using sh just to run ldconfig
Signed-off-by: Jonathan Conder <j@skurvy.no-ip.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/trans.c')
-rw-r--r--lib/libalpm/trans.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index 3c5141a1..2e25b787 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -344,6 +344,7 @@ int _alpm_runscriptlet(const char *root, const char *installfn,
char scriptfn[PATH_MAX];
char cmdline[PATH_MAX];
char tmpdir[PATH_MAX];
+ char *argv[] = { "sh", "-c", cmdline, NULL };
char *scriptpath;
int clean_tmpdir = 0;
int retval = 0;
@@ -401,7 +402,9 @@ int _alpm_runscriptlet(const char *root, const char *installfn,
scriptpath, script, ver);
}
- retval = _alpm_run_chroot(root, cmdline);
+ _alpm_log(PM_LOG_DEBUG, "executing \"%s\"\n", cmdline);
+
+ retval = _alpm_run_chroot(root, "/bin/sh", argv);
cleanup:
if(clean_tmpdir && _alpm_rmrf(tmpdir)) {