~ubuntu-branches/ubuntu/natty/logrotate/natty-updates

« back to all changes in this revision

Viewing changes to debian/patches/compress-499502.patch

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2008-11-07 14:57:09 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20081107145709-s8ktufsiktmkuidl
Tags: 3.7.7-1ubuntu1
* Merge with Debian experimental (LP: #64964). Remaining Ubuntu changes:
  - debian/control: Drop mailx to Suggests for Ubuntu; it's only used on
    request, and we don't configure an MTA by default.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Index: logrotate-3.7.1/logrotate.c
2
 
===================================================================
3
 
--- logrotate-3.7.1.orig/logrotate.c    2008-10-01 00:20:37.436532294 +0100
4
 
+++ logrotate-3.7.1/logrotate.c 2008-10-01 00:24:29.848750956 +0100
5
 
@@ -144,6 +144,12 @@
6
 
        message(MESS_ERROR, "unable to open %s for compression\n", name);
7
 
        return 1;
8
 
     }
9
 
+   
10
 
+    if (debug) {
11
 
+        message(MESS_DEBUG, "would compress log with: %s\n", fullCommand[0]);
12
 
+        close(inFile);
13
 
+        return 0;
14
 
+    }
15
 
     
16
 
     if ((outFile = open(compressedName, O_RDWR | O_CREAT | O_TRUNC, sb->st_mode)) < 0) {
17
 
        message(MESS_ERROR, "unable to open %s for compressed output\n",