+################################################################################
+#
+# Check all files for timestamps in the future; common from hardware
+# (e.g. alpha) which have far-future dates as their default dates.
+
+
+
+def Ent(Kind,Name,Link,Mode,UID,GID,Size,MTime,Major,Minor):
+ global future_files;
+
+ if MTime > current_time:
+ future_files[current_file] = MTime;
+ print "%s: %s '%s','%s',%u,%u,%u,%u,%u,%u,%u" % (current_file, Kind,Name,Link,Mode,UID,GID,Size, MTime, Major, Minor);
+
+def check_timestamps():
+ global current_file;
+
+ q = projectB.query("SELECT l.path, f.filename FROM files f, location l WHERE f.location = l.id AND f.filename ~ '.deb$'")
+ ql = q.getresult();
+ db_files.clear();
+ count = 0;
+ for i in ql:
+ filename = os.path.abspath(i[0] + i[1]);
+ if os.access(filename, os.R_OK):
+ file = utils.open_file(filename);
+ current_file = filename;
+ sys.stderr.write("Processing %s.\n" % (filename));
+ apt_inst.debExtract(file,Ent,"control.tar.gz");
+ file.seek(0);
+ apt_inst.debExtract(file,Ent,"data.tar.gz");
+ count = count + 1;
+ print "Checked %d files (out of %d)." % (count, len(db_files.keys()));
+