Package: debianutils
Version: 3.4
Severity: normal

Really, not that hard. This puts a blank line between reports, feel free
to change it to dashes or whatever.

Actually, just noticed this patch will not work due to you having tabs
in your source file, sorry.

--- debianutils-3.4/run-parts.c.orig    2012-01-05 11:10:01.327947941 +0000
+++ debianutils-3.4/run-parts.c 2012-01-05 11:29:28.165461092 +0000
@@ -166,6 +166,9 @@
   int result;
   int pid;
   int pout[2], perr[2];
+  int printflag;
+
+  printflag = 0;

   if (report_mode && (pipe(pout) || pipe(perr))) {
     error("pipe: %s", strerror(errno));
@@ -197,14 +200,13 @@

   if (report_mode) {
     fd_set set;
-    int max, r, printflag;
+    int max, r;
     ssize_t c;
     char buf[4096];

     close(pout[1]);
     close(perr[1]);
     max = pout[0] > perr[0] ? pout[0] + 1 : perr[0] + 1;
-    printflag = 0;

     while (pout[0] >= 0 || perr[0] >= 0) {

@@ -227,7 +229,7 @@
          c = read(pout[0], buf, sizeof(buf));
          if (c > 0) {
            if (!printflag) {
-             printf("%s:\n", progname);
+             printf("\n%s:\n", progname);
              fflush(stdout);
              printflag = 1;
            }
@@ -247,7 +249,7 @@
          c = read(perr[0], buf, sizeof(buf));
          if (c > 0) {
            if (!printflag) {
-             fprintf(stderr, "%s:\n", progname);
+             fprintf(stderr, "\n%s:\n", progname);
              fflush(stderr);
              printflag = 1;
            }
@@ -274,10 +276,16 @@
   waitpid(pid, &result, 0);

   if (WIFEXITED(result) && WEXITSTATUS(result)) {
+    if (report_mode && !printflag) {
+      fputc('\n', stderr);
+    }
     error("%s exited with return code %d", progname, WEXITSTATUS(result));
     exitstatus = 1;
   }
   else if (WIFSIGNALED(result)) {
+    if (report_mode && !printflag) {
+      fputc('\n', stderr);
+    }
     error("%s exited because of uncaught signal %d", progname,
          WTERMSIG(result));
     exitstatus = 1;



-- System Information:
Debian Release: 6.0.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.1.0-1-686-pae (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.ISO8859-1 (charmap=ISO-8859-1) 
(ignored: LC_ALL set to en_GB.ISO8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages debianutils depends on:
ii  libc6                         2.11.2-10  Embedded GNU C Library: Shared lib
ii  sensible-utils                0.0.4      Utilities for sensible alternative

debianutils recommends no packages.

debianutils suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to