Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/util.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-11-22 09:03:41 +0000
committerAaron Griffin <aaron@archlinux.org>2006-11-22 09:03:41 +0000
commit986409f9bd7b84e63352b9ec1f825b0c917627a6 (patch)
treef74350bb415326724e86408985ea0d43fe93c7b0 /lib/libalpm/util.c
parent54691771831c97c7366bf8ee7c54da3952c22120 (diff)
* 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
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r--lib/libalpm/util.c15
1 files changed, 9 insertions, 6 deletions
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 <event desc>" */
- 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 <ret code>" */
- } 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