]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/rm.py
Merge remote-tracking branch 'dktrkranz/fixes'
[dak.git] / daklib / rm.py
index 00643b1e5f1b09a850ba53f76c761718810e11e6..e6940d53de99fce1268c2588842ddc04cdcb346d 100644 (file)
@@ -372,7 +372,7 @@ def remove(session, reason, suites, removals,
     if date is None:
         date = commands.getoutput("date -R")
 
-    if partial:
+    if partial and components:
 
         component_ids_list = []
         for componentname in components:
@@ -465,7 +465,7 @@ def remove(session, reason, suites, removals,
                     session.execute("DELETE FROM bin_associations WHERE bin = :packageid AND suite = :suiteid",
                                     {'packageid': package_id, 'suiteid': suite_id})
                 # Delete from the override file
-                if partial:
+                if not partial:
                     if architecture == "source":
                         type_id = dsc_type_id
                     else:
@@ -585,6 +585,3 @@ def remove(session, reason, suites, removals,
 
         logfile.write("=========================================================================\n")
         logfile822.write("\n")
-
-        fcntl.lockf(logfile822, fcntl.LOCK_UN)
-        fcntl.lockf(logfile, fcntl.LOCK_UN)