summaryrefslogtreecommitdiff
path: root/lib/libalpm/util.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-03-22 08:22:48 +0000
committerAaron Griffin <aaron@archlinux.org>2007-03-22 08:22:48 +0000
commitd8ec08f578f413ef63ad6c23cbc11b1cb70ffd69 (patch)
tree9446470abb253f61e3c3ca37f02eac8ee76416f7 /lib/libalpm/util.c
parent3aa0c85716bd854cd88bd8df53ce6811cbf90ef0 (diff)
downloadpacman-d8ec08f578f413ef63ad6c23cbc11b1cb70ffd69.tar.xz
* Correct install scriptlet usage (reuse of handle->root when not needed)
* Skip running scriptlet when chroot fails - to prevent issues in the host filesystem
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r--lib/libalpm/util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 2b3847ad..daaa8c76 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -431,6 +431,7 @@ int _alpm_runscriptlet(const char *root, const char *installfn,
if(stat(installfn, &buf)) {
/* not found */
+ _alpm_log(PM_LOG_DEBUG, "scriptlet '%s' not found", installfn);
return(0);
}
@@ -469,6 +470,7 @@ int _alpm_runscriptlet(const char *root, const char *installfn,
/* just in case our cwd was removed in the upgrade operation */
if(chdir(root) != 0) {
_alpm_log(PM_LOG_ERROR, _("could not change directory to %s (%s)"), root, strerror(errno));
+ goto cleanup;
}
_alpm_log(PM_LOG_DEBUG, _("executing %s script..."), script);