continue
fn(f, srcqueue, "".join(lines[1:]), session)
- if len(changes_files) and not Options["No-Action"]:
- store_changelog(changes_files[0], srcqueue)
-
if opref != npref and not Options["No-Action"]:
newcomm = npref + comm[len(opref):]
os.rename("%s/%s" % (dir, comm), "%s/%s" % (dir, newcomm))
################################################################################
-def store_changelog(changes_file, srcqueue):
- Cnf = Config()
- u = Upload()
- u.pkg.changes_file = os.path.join(Cnf['Dir::Queue::Newstage'], changes_file)
- u.load_changes(u.pkg.changes_file)
- u.update_subst()
- query = """INSERT INTO changelogs (source, version, suite, changelog)
- VALUES (:source, :version, :suite, :changelog)"""
- session = DBConn().session()
- session.execute(query, {'source': u.pkg.changes['source'], 'version': u.pkg.changes['version'], \
- 'suite': srcqueue.queue_name, 'changelog': u.pkg.changes['changes']})
- session.commit()
-
-################################################################################
-
def main():
global Options, Logger