X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=daklib%2Fqueue.py;h=b11534a0592ac4b7e7f1f8316dbc8a13b7bae9a6;hb=9fa241c825a40bd09bd1c2e6b7f065f4a1dc0481;hp=a573ab83abf840b3d8693854067e024e5c954ee6;hpb=082e476dea381fdab797dc9429c5acee837dfb3d;p=dak.git 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