]> err.no Git - dak/commitdiff
typo fixes
authorMark Hymers <mhy@debian.org>
Sun, 4 Oct 2009 14:19:30 +0000 (14:19 +0000)
committerMark Hymers <mhy@debian.org>
Sun, 4 Oct 2009 14:19:30 +0000 (14:19 +0000)
Signed-off-by: Mark Hymers <mhy@debian.org>
dak/process_accepted.py
daklib/queue.py

index 9a56fa2e21f50e402419fbbd5b54d45c98d0f8b9..ffcc0421d8af0117317bc524b7e51198d285b696 100755 (executable)
@@ -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)
index a573ab83abf840b3d8693854067e024e5c954ee6..b11534a0592ac4b7e7f1f8316dbc8a13b7bae9a6 100755 (executable)
@@ -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