]> git.decadent.org.uk Git - dak.git/blobdiff - dak/rm.py
Whatever the difference between the summary and the subject field is: We
[dak.git] / dak / rm.py
index 2d502e08418f501352bb404aadb5633d9504c367..4c4100bfcc4857811c0a172e00d7a5672b5670ac 100755 (executable)
--- a/dak/rm.py
+++ b/dak/rm.py
@@ -119,6 +119,12 @@ def reverse_depends_check(removals, suites, arches=None):
             (result, output) = commands.getstatusoutput("gunzip -c %s > %s" % (filename, temp_filename))
             if (result != 0):
                 utils.fubar("Gunzip invocation failed!\n%s\n" % (output), result)
+            # Also check for udebs
+            filename = "%s/dists/%s/%s/debian-installer/binary-%s/Packages.gz" % (cnf["Dir::Root"], suites[0], component, architecture)
+            if os.path.exists(filename):
+                (result, output) = commands.getstatusoutput("gunzip -c %s >> %s" % (filename, temp_filename))
+                if (result != 0):
+                    utils.fubar("Gunzip invocation failed!\n%s\n" % (output), result)
             packages = utils.open_file(temp_filename)
             Packages = apt_pkg.ParseTagFile(packages)
             while Packages.Step():
@@ -520,19 +526,19 @@ def main ():
                 if element[2].find("source") > 0:
                     sources.append("%s_%s" % tuple(elem.strip(" ") for elem in element[:2]))
                     element[2] = sub("source\s?,?", "", element[2]).strip(" ")
-                if len(element[2]):
+                if element[2]:
                     binaries.append("%s_%s [%s]" % tuple(elem.strip(" ") for elem in element))
-    if len(sources):
+    if sources:
         logfile822.write("Sources:\n")
         for source in sources:
             logfile822.write(" %s\n" % source)
-    if len(binaries):
+    if binaries:
         logfile822.write("Binaries:\n")
         for binary in binaries:
             logfile822.write(" %s\n" % binary)
-    logfile822.write("Reason: %s\n" % (Options["Reason"]))
+    logfile822.write("Reason: %s\n" % Options["Reason"].replace('\n', '\n '))
     if Options["Done"]:
-        logfile822.write("Bug: %s\n" % (Options["Done"]))
+        logfile822.write("Bug: %s\n" % Options["Done"])
     logfile822.write("\n")
     logfile822.flush()
     logfile822.close()