]> git.decadent.org.uk Git - dak.git/commitdiff
Merge branch 'merge'
authorJoerg Jaspert <joerg@debian.org>
Thu, 29 Oct 2009 13:39:30 +0000 (14:39 +0100)
committerJoerg Jaspert <joerg@debian.org>
Thu, 29 Oct 2009 13:39:30 +0000 (14:39 +0100)
* merge:
  Use the same session when getting pool entries, otherwise we can't do poolfile.location
  Hide SystemError, otherwise logging gets ugly.
  Don't reject orig tarballs - we want them

dak/dak.py
daklib/queue.py

index 0d92c7d934ed1e01c7f70c9a29bbd707e957842c..19facc5592ef853fe36769720f7c8749d9d48d24 100755 (executable)
@@ -202,6 +202,8 @@ def main():
         print msg
         logger.log([msg])
         sys.exit(1)
+    except SystemExit:
+        pass
     except:
         for line in traceback.format_exc().split('\n')[:-1]:
             logger.log(['exception', line])
index 9c12d1e2fb5a9a11e857bcde4989c1cd54bc4618..f64e8ae6bd9f3501668f225de8a904fef80f2555 100755 (executable)
@@ -1212,7 +1212,7 @@ class Upload(object):
         # Try and find all orig mentioned in the .dsc
         target_dir = '.'
         for filename, entry in self.pkg.dsc_files.iteritems():
-            if re_is_orig_source.match(filename):
+            if not re_is_orig_source.match(filename):
                 # File is not an orig; ignore
                 continue
 
@@ -1234,10 +1234,11 @@ class Upload(object):
                 os.symlink(path, os.path.join(target_dir, filename))
                 return True
 
+            session = DBConn().session()
             found = False
 
             # Look in the pool
-            for poolfile in get_poolfile_like_name('/%s' % filename):
+            for poolfile in get_poolfile_like_name('/%s' % filename, session):
                 poolfile_path = os.path.join(
                     poolfile.location.path, poolfile.filename
                 )
@@ -1246,6 +1247,8 @@ class Upload(object):
                     found = True
                     break
 
+            session.close()
+
             if found:
                 continue