# 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
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
)
found = True
break
+ session.close()
+
if found:
continue