X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fqueue.py;h=b652f844370f3409c8badd37df2ce86caa3d4998;hb=886522194878afe478e4dd61397493f35b5b0e5d;hp=213dbd58cc6f3a1b1c66d3b6adff814d865d9a62;hpb=c60216732d70ba63ebd59858070fd07d7e17ab77;p=dak.git diff --git a/daklib/queue.py b/daklib/queue.py index 213dbd58..b652f844 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -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"]) @@ -2517,7 +2527,7 @@ distribution.""" """ Cnf = Config() anyversion = None - anysuite = [suite] + Cnf.ValueList("Suite::%s::VersionChecks::Enhances" % (suite)) + anysuite = [suite] + [ vc.reference.suite_name for vc in get_version_checks(suite, "Enhances") ] for (s, v) in sv_list: if s in [ x.lower() for x in anysuite ]: if not anyversion or apt_pkg.VersionCompare(anyversion, v) <= 0: @@ -2547,8 +2557,8 @@ distribution.""" # Check versions for each target suite for target_suite in self.pkg.changes["distribution"].keys(): - must_be_newer_than = [ i.lower() for i in cnf.ValueList("Suite::%s::VersionChecks::MustBeNewerThan" % (target_suite)) ] - must_be_older_than = [ i.lower() for i in cnf.ValueList("Suite::%s::VersionChecks::MustBeOlderThan" % (target_suite)) ] + must_be_newer_than = [ vc.reference.suite_name for vc in get_version_checks(target_suite, "MustBeNewerThan") ] + must_be_older_than = [ vc.reference.suite_name for vc in get_version_checks(target_suite, "MustBeOlderThan") ] # Enforce "must be newer than target suite" even if conffile omits it if target_suite not in must_be_newer_than: