]> git.decadent.org.uk Git - dak.git/commitdiff
dak/clean_suites.py (check_sources): af_bin.last_used can be NULL
authorAnsgar Burchardt <ansgar@debian.org>
Fri, 17 Aug 2012 09:49:31 +0000 (11:49 +0200)
committerAnsgar Burchardt <ansgar@debian.org>
Fri, 17 Aug 2012 09:49:31 +0000 (11:49 +0200)
dak/clean_suites.py

index e7808ec9c77cb0dbbb5f4eabd3fd918841de5e9e..f16474b14ff0405abe2c5fdeca54f8c9cd8b6453 100755 (executable)
@@ -138,7 +138,7 @@ def check_sources(now_date, session):
                               JOIN binaries b ON af_bin.file_id = b.file
                              WHERE b.source = df.source
                                AND af_bin.archive_id = af.archive_id
-                               AND af_bin.last_used > ad.delete_date)
+                               AND (af_bin.last_used IS NULL OR af_bin.last_used > ad.delete_date))
           OR EXISTS (SELECT 1 FROM extra_src_references esr
                          JOIN bin_associations ba ON esr.bin_id = ba.bin
                          JOIN binaries b ON ba.bin = b.id