Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/trans.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-04-08 21:55:30 -0500
committerDan McGee <dan@archlinux.org>2012-04-08 21:55:30 -0500
commitd158dde30c378acc8e88d5208aa837f92331af9e (patch)
treeb99456c7b765becdb5bab3869af5a2e512026562 /lib/libalpm/trans.c
parent31091963edaa505d00642aecb9950ce087a40b73 (diff)
parentb729ed01093312cef7ce48d07b13e225b25446db (diff)
Merge remote-tracking branch 'dave/buildsys'
Oh god, what are we thinking thinking merging this. Hopefully this works with only a few follow-up patches necessary.
Diffstat (limited to 'lib/libalpm/trans.c')
-rw-r--r--lib/libalpm/trans.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index 4309c07e..08f70dd7 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -276,8 +276,8 @@ static int grep(const char *fn, const char *needle)
int _alpm_runscriptlet(alpm_handle_t *handle, const char *filepath,
const char *script, const char *ver, const char *oldver, int is_archive)
{
- char cmdline[PATH_MAX];
- char *argv[] = { SCRIPTLET_SHELL, "-c", cmdline, NULL };
+ char arg0[64], arg1[3], cmdline[PATH_MAX];
+ char *argv[] = { arg0, arg1, cmdline, NULL };
char *tmpdir, *scriptfn = NULL, *scriptpath;
int retval = 0;
size_t len;
@@ -293,6 +293,9 @@ int _alpm_runscriptlet(alpm_handle_t *handle, const char *filepath,
return 0;
}
+ strcpy(arg0, SCRIPTLET_SHELL);
+ strcpy(arg1, "-c");
+
/* create a directory in $root/tmp/ for copying/extracting the scriptlet */
len = strlen(handle->root) + strlen("tmp/alpm_XXXXXX") + 1;
MALLOC(tmpdir, len, RET_ERR(handle, ALPM_ERR_MEMORY, -1));