From 43f4505b1e2be3745468b74771a08cca49148996 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Sat, 26 Mar 2005 13:29:47 +0000 Subject: More backport from pacman 2.9.5 (mainly for resolvedeps) --- lib/libalpm/util.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/libalpm/util.c') diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index 12b81be3..174c3a66 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -387,11 +387,15 @@ int _alpm_runscriptlet(char *root, char *installfn, char *script, char *ver, cha if(!_alpm_grep(scriptfn, script)) { /* script not found in scriptlet file */ + if(strlen(tmpdir) && _alpm_rmrf(tmpdir)) { + /* ORE + _alpm_log(PM_LOG_WARNING, "could not remove tmpdir %s", tmpdir);*/ + } return(0); } /* ORE - _alpm_log(PM_LOG_FLOW2, "Executing %s script...\n", script);*/ + _alpm_log(PM_LOG_FLOW2, "Executing %s script...", script);*/ if(oldver) { snprintf(cmdline, PATH_MAX, "echo \"umask 0022; source %s %s %s %s\" | chroot %s /bin/sh", scriptpath, script, ver, oldver, root); @@ -400,11 +404,12 @@ int _alpm_runscriptlet(char *root, char *installfn, char *script, char *ver, cha scriptpath, script, ver, root); } /* ORE - _alpm_log(PM_LOG_FLOW2, "%s\n", cmdline);*/ + _alpm_log(PM_LOG_FLOW2, "%s", cmdline);*/ system(cmdline); if(strlen(tmpdir) && _alpm_rmrf(tmpdir)) { - fprintf(stderr, "warning: could not remove tmpdir %s\n", tmpdir); + /* ORE + _alpm_log(PM_LOG_WARNING, "could not remove tmpdir %s", tmpdir);*/ } return(0); } -- cgit v1.2.3