summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2007-11-29 13:58:00 -0600
committerDan McGee <dan@archlinux.org>2007-12-10 23:02:07 -0600
commit565d2eeed5fdd85b516cbc76bc48be439e42c41f (patch)
treef17e86c79386c3e977bb9625013886dd74af2071 /lib/libalpm
parent9781d0d637fb2a077b0c4b262af1e2fb4decc2a0 (diff)
Correct scriptlet usage pattern
The new pattern is as follows: . /path/to/scriptlet post_upgrade X Y This requires less frameworking in the install scripts (the three lines that shift and eval a function are nasty) Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/trans.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index 4bc0ce74..70e34d43 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -511,9 +511,6 @@ int _alpm_runscriptlet(const char *root, const char *installfn,
goto cleanup;
}
- /* mark the scriptlet as executable */
- chmod(scriptfn, 0755);
-
/* chop off the root so we can find the tmpdir in the chroot */
scriptpath = scriptfn + strlen(root) - 1;
@@ -538,10 +535,10 @@ int _alpm_runscriptlet(const char *root, const char *installfn,
_alpm_log(PM_LOG_DEBUG, "executing %s script...\n", script);
if(oldver) {
- snprintf(cmdline, PATH_MAX, "%s %s %s %s",
+ snprintf(cmdline, PATH_MAX, ". %s; %s %s %s",
scriptpath, script, ver, oldver);
} else {
- snprintf(cmdline, PATH_MAX, "%s %s %s",
+ snprintf(cmdline, PATH_MAX, ". %s; %s %s",
scriptpath, script, ver);
}
_alpm_log(PM_LOG_DEBUG, "%s\n", cmdline);