summaryrefslogtreecommitdiffstats
path: root/src/pacman/log.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-02-04 04:24:32 +0100
committerAaron Griffin <aaron@archlinux.org>2007-02-04 04:24:32 +0100
commitb2da4b42344444dc22f1e5b01fb4cd09033adc1d (patch)
treebcd6b0f4e960ead1c234ae3d3f21daa5d8e477d6 /src/pacman/log.c
parente3c7e92f1090204ba945c063b7aba3b3b1d8095b (diff)
downloadpacman-b2da4b42344444dc22f1e5b01fb4cd09033adc1d.tar.gz
pacman-b2da4b42344444dc22f1e5b01fb4cd09033adc1d.tar.xz
* Added archive verification when loading package metadata for -u and -A
operations (now aborts on a corrupt archive) * Fixed the pm_fprintf newline error that was plaguing us. It seems a line resetting 'neednl' was removed a while back (by me). This causes all the output errors we've been seeing
Diffstat (limited to 'src/pacman/log.c')
-rw-r--r--src/pacman/log.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pacman/log.c b/src/pacman/log.c
index ccdd9a66..4bed22ae 100644
--- a/src/pacman/log.c
+++ b/src/pacman/log.c
@@ -126,19 +126,19 @@ void pm_fprintf(FILE *file, unsigned short line, char *fmt, ...)
}
fprintf(file, str);
+
if(needpad == 1) {
unsigned int i, cols = getcols();
for(i=len; i < cols; ++i) {
fprintf(file, " ");
}
- if(neednl == 1) {
+ if(neednl == 1 && line == NL) {
fprintf(file, "\n");
neednl = 0;
- } else {
- neednl = 1;
}
}
fflush(file);
+ neednl = (str[strlen(str)-1] == '\n') ? 0 : 1;
}
/* Check verbosity option and, if set, print the