From: Mark Hymers Date: Sun, 4 Oct 2009 14:19:30 +0000 (+0000) Subject: typo fixes X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=85569c95d888b1ad94338f2326faabf6e22bcd8a;p=dak.git typo fixes Signed-off-by: Mark Hymers --- diff --git a/dak/process_accepted.py b/dak/process_accepted.py index 9a56fa2e..ffcc0421 100755 --- a/dak/process_accepted.py +++ b/dak/process_accepted.py @@ -111,7 +111,7 @@ def usage (exit_code=0): ############################################################################### -def action (u, stable_queue=None, log_urgency=True): +def action (u, stable_queue=None, log_urgency=True, session=None): (summary, short_summary) = u.build_summaries() pi = u.package_info() @@ -319,7 +319,7 @@ def add_deb_to_db(u, filename, session): session.flush() # Deal with contents - contents = copy_temporary_contents(bin.package, bin.version, bin.architecture.arch_string, fullpath, None, session) + contents = copy_temporary_contents(bin.package, bin.version, bin.architecture.arch_string, os.path.basename(filename), None, session) if not contents: print "REJECT\nCould not determine contents of package %s" % bin.package session.rollback() @@ -390,7 +390,7 @@ def install(u, session, log_urgency=True): # Copy the .changes file across for suite which need it. copy_changes = {} copy_dot_dak = {} - for suite_name in changes["distribution"].keys(): + for suite_name in u.pkg.changes["distribution"].keys(): if cnf.has_key("Suite::%s::CopyChanges" % (suite_name)): copy_changes[cnf["Suite::%s::CopyChanges" % (suite_name)]] = "" # and the .dak file... @@ -622,8 +622,8 @@ def process_it(changes_file, stable_queue, log_urgency, session): if stable_queue: u.pkg.changes_file = old - u.accepted_checks(overwrite_checks, True, session) - action(u, stable_queue, log_urgency) + u.accepted_checks(overwrite_checks, session) + action(u, stable_queue, log_urgency, session) # Restore CWD os.chdir(u.prevdir) diff --git a/daklib/queue.py b/daklib/queue.py index a573ab83..b11534a0 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -486,7 +486,7 @@ class Upload(object): (source, dest) = args[1:3] if self.pkg.changes["distribution"].has_key(source): for arch in self.pkg.changes["architecture"].keys(): - if arch not in [ arch_string for a in get_suite_architectures(source) ]: + if arch not in [ a.arch_string for a in get_suite_architectures(source) ]: self.notes.append("Mapping %s to %s for unreleased architecture %s." % (source, dest, arch)) del self.pkg.changes["distribution"][source] self.pkg.changes["distribution"][dest] = 1 @@ -740,6 +740,16 @@ class Upload(object): if entry.has_key("byhand"): return + # Check we have fields we need to do these checks + oktogo = True + for m in ['component', 'package', 'priority', 'size', 'md5sum']: + if not entry.has_key(m): + self.rejects.append("file '%s' does not have field %s set" % (f, m)) + oktogo = False + + if not oktogo: + return + # Handle component mappings for m in cnf.ValueList("ComponentMappings"): (source, dest) = m.split() @@ -754,8 +764,7 @@ class Upload(object): return # Validate the component - component = entry["component"] - if not get_component(component, session): + if not get_component(entry["component"], session): self.rejects.append("file '%s' has unknown component '%s'." % (f, component)) return