[Secure-testing-commits] r11970 - lib/python

Florian Weimer fw at alioth.debian.org
Sun May 24 20:18:48 UTC 2009


Author: fw
Date: 2009-05-24 20:18:48 +0000 (Sun, 24 May 2009)
New Revision: 11970

Modified:
   lib/python/debian_support.py
Log:
lib/python/debian_support.py (updateFile): work around broken diffs


Modified: lib/python/debian_support.py
===================================================================
--- lib/python/debian_support.py	2009-05-24 20:16:15 UTC (rev 11969)
+++ lib/python/debian_support.py	2009-05-24 20:18:48 UTC (rev 11970)
@@ -376,7 +376,8 @@
         return downloadFile(remote, local)
 
     for patch_name in patches_to_apply:
-        print "updateFile: downloading patch " + `patch_name`
+        if verbose:
+            print "updateFile: downloading patch " + `patch_name`
         try:
             patch_contents = downloadGunzipLines(remote + '.diff/' + patch_name
                                                  + '.gz')
@@ -388,8 +389,10 @@
         
     new_hash = readLinesSHA1(lines)
     if new_hash <> remote_hash:
-        raise ValueError, ("patch failed, got %s instead of %s"
-                           % (new_hash, remote_hash))
+        if verbose:
+            print "updateFile: patch failed, got %s instead of %s" \
+                % (new_hash, remote_hash))
+        return return downloadFile(remote, local)
 
     replaceFile(lines, local)
     return lines




More information about the Secure-testing-commits mailing list