Skip to content

Commit

Permalink
old updater: fixes for changes in fs/db_storage
Browse files Browse the repository at this point in the history
  • Loading branch information
clemux committed Jul 3, 2015
1 parent 625ef84 commit c85c034
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions debsources/updater.py
Expand Up @@ -196,16 +196,19 @@ def _add_package(pkg, conf, session, sticky=False):
logging.warning('package %s has no extracion dir, skipping' % pkg)
return
if not conf['dry_run'] and 'fs' in conf['backends']:
fs_storage.extract_package(pkg, pkgdir)
fs_storage.extract_package(pkg.description(conf['sources_dir']),
pkgdir)
os.chdir(pkgdir)
with session.begin_nested():
# single db session for package addition and hook execution: if the
# hooks fail, the package won't be added to the db (it will be
# tried again at next run)
file_table = None
if not conf['dry_run'] and 'db' in conf['backends']:
file_table = db_storage.add_package(session, pkg, pkgdir,
sticky)
file_table = db_storage.add_package(
session,
pkg.description(conf['sources_dir']), pkgdir,
sticky)
exclude_files(session, pkg, pkgdir, file_table, conf['exclude'])
if not conf['dry_run'] and 'hooks' in conf['backends']:
notify(conf, 'add-package', session, pkg, pkgdir, file_table)
Expand Down

0 comments on commit c85c034

Please sign in to comment.