autoimport: log which packages are dropped
authorHelmut Grohne <helmut@subdivi.de>
Sat, 23 Feb 2013 08:36:15 +0000 (09:36 +0100)
committerHelmut Grohne <helmut@subdivi.de>
Sat, 23 Feb 2013 08:36:15 +0000 (09:36 +0100)
autoimport.py

index c662008..02ac58e 100755 (executable)
@@ -35,9 +35,11 @@ def main():
         if dl.wait():
             print("curl failed")
     
+    delpkgs = set(knownpkgs) - distpkgs
+    print("clearing packages %s" % " ".join(delpkgs))
     cur.execute("PRAGMA foreign_keys=1;")
     cur.executemany("DELETE FROM package WHERE package = ?;",
-                    ((pkg,) for pkg in set(knownpkgs) - distpkgs))
+                    ((pkg,) for pkg in delpkgs))
     db.commit()
 
 if __name__ == "__main__":