X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fprocess_accepted.py;h=07258018bb13426ca3394670096de2948df1194e;hb=cd5b29ddfd8de263c085f494b9573d683913f6f3;hp=a29c892185c6f93626e2c8563a26dd6ba13bddcc;hpb=cdffcfe2a0e6804ed35df56c4c2aa084c2b63677;p=dak.git diff --git a/dak/process_accepted.py b/dak/process_accepted.py index a29c8921..07258018 100755 --- a/dak/process_accepted.py +++ b/dak/process_accepted.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Installs Debian packages from queue/accepted into the pool +""" Installs Debian packages from queue/accepted into the pool """ # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006 James Troup # This program is free software; you can redistribute it and/or modify @@ -30,7 +30,7 @@ ############################################################################### import errno, fcntl, os, sys, time, re -import apt_pkg +import apt_pkg, tarfile, commands from daklib import database from daklib import logging from daklib import queue @@ -97,8 +97,10 @@ class Urgency_Log: else: os.unlink(self.log_filename) + ############################################################################### + def reject (str, prefix="Rejected: "): global reject_message if str: @@ -372,6 +374,13 @@ def install (): suite_id = database.get_suite_id(suite) projectB.query("INSERT INTO bin_associations (suite, bin) VALUES (%d, currval('binaries_id_seq'))" % (suite_id)) + # insert contents into the database + contents = utils.generate_contents_information(file) + q = projectB.query("SELECT currval('binaries_id_seq')") + bin_id = int(q.getresult()[0][0]) + for file in contents: + database.insert_content_path(bin_id, file) + # If the .orig.tar.gz is in a legacy directory we need to poolify # it, so that apt-get source (and anything else that goes by the # "Directory:" field in the Sources.gz file) works. @@ -434,7 +443,6 @@ def install (): utils.copy(pkg.changes_file, Cnf["Dir::Root"] + dest) for dest in copy_dot_dak.keys(): utils.copy(Upload.pkg.changes_file[:-8]+".dak", dest) - projectB.query("COMMIT WORK") # Move the .changes into the 'done' directory