+ # Undo the work done in katie.py(accept) to help auto-building
+ # from accepted.
+ if Cnf.FindB("Dinstall::SpecialAcceptedAutoBuild") and \
+ changes["distribution"].has_key("unstable"):
+ now_date = time.strftime("%Y-%m-%d %H:%M", time.localtime(time.time()));
+ projectB.query("BEGIN WORK");
+ for file in files.keys():
+ dest = os.path.join(Cnf["Dir::AcceptedAutoBuild"], file);
+ # Remove it from the list of packages for later processing by apt-ftparchive
+ projectB.query("UPDATE unstable_accepted SET in_accepted = 'f', last_used = '%s' WHERE filename = '%s'" % (now_date, dest));
+ # Update the symlink to point to the new location in the pool
+ pool_location = utils.poolify (changes["source"], files[file]["component"]);
+ src = os.path.join(Cnf["Dir::Pool"], pool_location, os.path.basename(file));
+ if os.path.islink(dest):
+ os.unlink(dest);
+ os.symlink(src, dest);
+ # Update last_used on any non-upload .orig.tar.gz symlink
+ if orig_tar_id:
+ # Determine the .orig.tar.gz file name
+ for dsc_file in dsc_files.keys():
+ if dsc_file[-12:] == ".orig.tar.gz":
+ orig_tar_gz = os.path.join(Cnf["Dir::AcceptedAutoBuild"], dsc_file);
+ # Remove it from the list of packages for later processing by apt-ftparchive
+ projectB.query("UPDATE unstable_accepted SET in_accepted = 'f', last_used = '%s' WHERE filename = '%s'" % (now_date, orig_tar_gz));
+ projectB.query("COMMIT WORK");
+