+2008-04-25 Joerg Jaspert <joerg@debian.org>
+
+ * dak/split_done.py (main): Only move files into their subdirs if
+ they are older than 30 days. That enables us to run this script as
+ part of a cronjob.
+
+ * config/debian/cron.weekly: Run dak split-done
+
2008-04-23 Thomas Viehmann <tviehmann@debian.org>
* dak/process_unchecked.py: add changes["sponsoremail"]
# Clean up apt-ftparchive's databases
+# Split queue/done
+dak split-done
+
cd $configdir
apt-ftparchive -q clean apt.conf
apt-ftparchive -q clean apt.conf.buildd
+
################################################################################
def main():
Cnf = daklib.utils.get_conf()
count = 0
+ move_date = int(time.time())-(30*84600)
os.chdir(Cnf["Dir::Queue::Done"])
files = glob.glob("%s/*" % (Cnf["Dir::Queue::Done"]))
for filename in files:
if os.path.isfile(filename):
- mtime = time.gmtime(os.stat(filename)[stat.ST_MTIME])
+ filemtime = os.stat(filename)[stat.ST_MTIME]
+ if filemtime < move_date:
+ continue
+ mtime = time.gmtime(filemtime)
dirname = time.strftime("%Y/%m/%d", mtime)
if not os.path.exists(dirname):
print "Creating: %s" % (dirname)