From d8ec08f578f413ef63ad6c23cbc11b1cb70ffd69 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Thu, 22 Mar 2007 08:22:48 +0000 Subject: * Correct install scriptlet usage (reuse of handle->root when not needed) * Skip running scriptlet when chroot fails - to prevent issues in the host filesystem --- lib/libalpm/util.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/libalpm/util.c') 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); -- cgit v1.2.3-24-g4f1b