setfiles was always putting out a \n, even when not many files were
being fixed. yum transactions were being desturbed by this.
--- nsapolicycoreutils/setfiles/setfiles.c 2008-08-28 09:34:24.000000000 -0400
+++ policycoreutils-2.0.62/setfiles/setfiles.c 2009-05-14 11:05:15.000000000 -0400
@@ -29,6 +29,8 @@
static int mass_relabel;
static int mass_relabel_errs;
+#define STAR_COUNT 1000
+
static FILE *outfile = NULL;
static int force = 0;
#define STAT_BLOCK_SIZE 1
@@ -444,11 +446,11 @@
if (progress) {
count++;
- if (count % 80000 == 0) {
+ if (count % (80 * STAR_COUNT) == 0) {
fprintf(stdout, "\n");
fflush(stdout);
}
- if (count % 1000 == 0) {
+ if (count % STAR_COUNT == 0) {
fprintf(stdout, "*");
fflush(stdout);
}
@@ -1017,7 +1019,7 @@
free(excludeArray[i].directory);
}
- if (progress)
+ if (progress && count >= STAR_COUNT)
printf("\n");
exit(errors);
}