From: Joerg Jaspert Date: Thu, 29 Oct 2009 13:39:30 +0000 (+0100) Subject: Merge branch 'merge' X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=1ff93a0bc08432270fde894e075f81fc1cd6841a;hp=ae37d5f55e54766817d5487967b1b3a2349e1d87;p=dak.git Merge branch 'merge' * 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 --- diff --git a/dak/dak.py b/dak/dak.py index 0d92c7d9..19facc55 100755 --- a/dak/dak.py +++ b/dak/dak.py @@ -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]) diff --git a/daklib/queue.py b/daklib/queue.py index 9c12d1e2..f64e8ae6 100755 --- a/daklib/queue.py +++ b/daklib/queue.py @@ -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