# Check for any binaries which are marked for eventual deletion
# but are now used again.
-
+
q = session.execute("""
SELECT b.file, f.filename FROM binaries b, files f
WHERE f.last_used IS NOT NULL AND f.id = b.file
session.commit()
########################################
-
+
def check_sources(now_date, delete_date, max_delete, session):
print "Checking for orphaned source packages..."
#### reinstate sources because of them
for i in q.fetchall():
- Logger.log(["unset lastused", i[1]])
+ Logger.log(["unset lastused", i[1]])
session.execute("UPDATE files SET last_used = NULL WHERE id = :fileid",
{'fileid': i[0]})
if not Options["No-Action"]:
session.delete(pf)
-
+
else:
utils.fubar("%s is neither symlink nor file?!" % (filename))