depcheck: remove the 6h condition
authorHelmut Grohne <helmut@subdivi.de>
Sat, 2 Mar 2019 14:41:15 +0000 (15:41 +0100)
committerHelmut Grohne <helmut@subdivi.de>
Sat, 2 Mar 2019 14:41:15 +0000 (15:41 +0100)
If the release timestamp doesn't change, we should assume that the
content didn't either.

depcheck.py

index cb2e7e4..d2c6bf6 100755 (executable)
@@ -442,12 +442,9 @@ def main():
     mirror.update_release()
     db = sqlite3.connect("db")
     cur = db.cursor()
-    lastupdate = datetime.datetime.utcnow() - datetime.timedelta(hours=6)
-    cur.execute("""
-        SELECT architecture FROM depcheck
-            WHERE giveback = 1 OR updatetime < ? OR releasetime < ?;""",
-                (datetime.datetime.utcnow() - datetime.timedelta(hours=6),
-                 mirror.releasetime))
+    cur.execute("""SELECT architecture FROM depcheck
+                       WHERE giveback = 1 OR releasetime < ?;""",
+                (mirror.releasetime,))
     for architecture, in list(cur.fetchall()):
         print("update %s" % architecture)
         update_depcheck(mirror, db, architecture)