X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fqueue.py;h=2b7f52048a29d2a055fcce91faba825d29bc548c;hb=a6fe641395cb2f5f2a48d7fe1ffef2ff9c701165;hp=b7eba9537aba8fbabb8883cb0e9c4a9726af47b2;hpb=71c48c6fce3e9f48367a19ed87c2400142c6f722;p=dak.git diff --git a/daklib/queue.py b/daklib/queue.py index b7eba953..2b7f5204 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -63,7 +63,7 @@ warnings.filterwarnings('ignore', \ "apt_pkg.ParseSection\(\) is deprecated. Please see apt_pkg\.TagSection\(\) for the replacement\.", \ DeprecationWarning) warnings.filterwarnings('ignore', \ - "Attribute 'Find' of the 'apt_pkg\.TagSection' object is deprecated, use 'find' instead\.", \ + "Attribute '.*' of the 'apt_pkg\.TagSection' object is deprecated, use '.*' instead\.", \ DeprecationWarning) ############################################################################### @@ -87,6 +87,9 @@ def get_type(f, session): file_type = f["dbtype"] elif re_source_ext.match(f["type"]): file_type = "dsc" + elif f['architecture'] == 'source' and f["type"] == 'unreadable': + utils.warn('unreadable source file (will continue and hope for the best)') + return f["type"] else: file_type = f["type"] utils.fubar("invalid type (%s) for new. Dazed, confused and sure as heck not continuing." % (file_type)) @@ -102,7 +105,7 @@ def get_type(f, session): # Determine what parts in a .changes are NEW -def determine_new(filename, changes, files, warn=1, session = None, dsc = None, new = {}): +def determine_new(filename, changes, files, warn=1, session = None, dsc = None, new = None): """ Determine what parts in a C{changes} file are NEW. @@ -131,6 +134,8 @@ def determine_new(filename, changes, files, warn=1, session = None, dsc = None, # TODO: This should all use the database instead of parsing the changes # file again byhand = {} + if new is None: + new = {} dbchg = get_dbchange(filename, session) if dbchg is None: @@ -2188,8 +2193,13 @@ distribution.""" session.commit() # Move the .changes into the 'done' directory + ye, mo, da = time.gmtime()[0:3] + donedir = os.path.join(cnf["Dir::Queue::Done"], str(ye), "%0.2d" % mo, "%0.2d" % da) + if not os.path.isdir(donedir): + os.makedirs(donedir) + utils.move(self.pkg.changes_file, - os.path.join(cnf["Dir::Queue::Done"], os.path.basename(self.pkg.changes_file))) + os.path.join(donedir, os.path.basename(self.pkg.changes_file))) if self.pkg.changes["architecture"].has_key("source") and cnf.get("Dir::UrgencyLog"): UrgencyLog().log(self.pkg.dsc["source"], self.pkg.dsc["version"], self.pkg.changes["urgency"])