From 986409f9bd7b84e63352b9ec1f825b0c917627a6 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Wed, 22 Nov 2006 09:03:41 +0000 Subject: * Completed getinfo api changes (pmmissing_t, pmtrans_t, etc) * Modified some dependancy checking * Changed "performing local database upgrade" message to be more clear * Change 'usize' to 'isize' in database files * Scriptlet output is now sent to pacman's log file * Limited some debugging output to be more clear --- lib/libalpm/util.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'lib/libalpm/util.c') diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index cca43117..1610c43f 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -511,13 +511,16 @@ int _alpm_runscriptlet(char *root, char *installfn, char *script, char *ver, cha if(fgets(line, 1024, pp) == NULL) break; /* "START " */ - if((strlen(line) > strlen(STARTSTR)) && !strncmp(line, STARTSTR, strlen(STARTSTR))) { - EVENT(trans, PM_TRANS_EVT_SCRIPTLET_START, _alpm_strtrim(line + strlen(STARTSTR)), NULL); + if((strlen(line) > strlen(SCRIPTLET_START)) && !strncmp(line, SCRIPTLET_START, strlen(SCRIPTLET_START))) { + EVENT(trans, PM_TRANS_EVT_SCRIPTLET_START, _alpm_strtrim(line + strlen(SCRIPTLET_START)), NULL); /* "DONE " */ - } else if((strlen(line) > strlen(DONESTR)) && !strncmp(line, DONESTR, strlen(DONESTR))) { - EVENT(trans, PM_TRANS_EVT_SCRIPTLET_DONE, (void*)atol(_alpm_strtrim(line + strlen(DONESTR))), NULL); + } else if((strlen(line) > strlen(SCRIPTLET_DONE)) && !strncmp(line, SCRIPTLET_DONE, strlen(SCRIPTLET_DONE))) { + EVENT(trans, PM_TRANS_EVT_SCRIPTLET_DONE, (void*)atol(_alpm_strtrim(line + strlen(SCRIPTLET_DONE))), NULL); } else { - EVENT(trans, PM_TRANS_EVT_SCRIPTLET_INFO, _alpm_strtrim(line), NULL); + _alpm_strtrim(line); + /* log our script output */ + alpm_logaction(line); + EVENT(trans, PM_TRANS_EVT_SCRIPTLET_INFO, line, NULL); } } pclose(pp); @@ -577,7 +580,7 @@ int _alpm_check_freespace(pmtrans_t *trans, pmlist_t **data) pmsyncpkg_t *sync = i->data; if(sync->type != PM_SYNC_TYPE_REPLACE) { pmpkg_t *pkg = sync->pkg; - pkgsize += pkg->usize; + pkgsize += pkg->isize; } } else -- cgit v1.2.3-54-g00ecf