-n, --binnmu display binNMUs uploads instead of source ones
-e, --export export interesting files from source packages
-n, --binnmu display binNMUs uploads instead of source ones
-e, --export export interesting files from source packages
- -a, --archive archive to fetch data from"""
+ -a, --archive archive to fetch data from
+ -p, --progress display progress status"""
-def export_files(session, archive, clpool):
+def export_files(session, archive, clpool, progress=False):
unpack = {}
files = ('changelog', 'copyright', 'NEWS.Debian', 'README.Debian')
stats = {'unpack': 0, 'created': 0, 'removed': 0, 'errors': 0, 'files': 0}
unpack = {}
files = ('changelog', 'copyright', 'NEWS.Debian', 'README.Debian')
stats = {'unpack': 0, 'created': 0, 'removed': 0, 'errors': 0, 'files': 0}
- query = """SELECT DISTINCT s.source, su.suite_name AS suite, s.version, c.name || '/' || f.filename
+ query = """SELECT DISTINCT s.source, su.suite_name AS suite, s.version, c.name || '/' || f.filename AS filename
FROM source s
JOIN newest_source n ON n.source = s.source AND n.version = s.version
JOIN src_associations sa ON sa.source = s.id
JOIN suite su ON su.id = sa.suite
JOIN files f ON f.id = s.file
FROM source s
JOIN newest_source n ON n.source = s.source AND n.version = s.version
JOIN src_associations sa ON sa.source = s.id
JOIN suite su ON su.id = sa.suite
JOIN files f ON f.id = s.file
JOIN component c ON fam.component_id = c.id
WHERE su.archive_id = :archive_id
ORDER BY s.source, suite"""
JOIN component c ON fam.component_id = c.id
WHERE su.archive_id = :archive_id
ORDER BY s.source, suite"""
if not os.path.exists(path):
os.makedirs(path)
if not os.path.exists(os.path.join(path, \
if not os.path.exists(path):
os.makedirs(path)
if not os.path.exists(os.path.join(path, \
if not unpack.has_key(os.path.join(pool, sources[p][s][1])):
unpack[os.path.join(pool, sources[p][s][1])] = (path, set())
unpack[os.path.join(pool, sources[p][s][1])][1].add(s)
if not unpack.has_key(os.path.join(pool, sources[p][s][1])):
unpack[os.path.join(pool, sources[p][s][1])] = (path, set())
unpack[os.path.join(pool, sources[p][s][1])][1].add(s)
(package[0], package[1], os.path.basename(f)))
if not os.path.exists(version):
os.link(f, version)
(package[0], package[1], os.path.basename(f)))
if not os.path.exists(version):
os.link(f, version)
('s','suite','Make-Changelog::Options::Suite','HasArg'),
('b','base-suite','Make-Changelog::Options::Base-Suite','HasArg'),
('n','binnmu','Make-Changelog::Options::binNMU'),
('s','suite','Make-Changelog::Options::Suite','HasArg'),
('b','base-suite','Make-Changelog::Options::Base-Suite','HasArg'),
('n','binnmu','Make-Changelog::Options::binNMU'),
- ('e','export','Make-Changelog::Options::export')]
+ ('e','export','Make-Changelog::Options::export'),
+ ('p','progress','Make-Changelog::Options::progress')]
- for i in ['help', 'suite', 'base-suite', 'binnmu', 'export']:
+ for i in ['help', 'suite', 'base-suite', 'binnmu', 'export', 'progress']:
if not Cnf.has_key('Make-Changelog::Options::%s' % (i)):
Cnf['Make-Changelog::Options::%s' % (i)] = ''
if not Cnf.has_key('Make-Changelog::Options::%s' % (i)):
Cnf['Make-Changelog::Options::%s' % (i)] = ''
base_suite = Cnf['Make-Changelog::Options::Base-Suite']
binnmu = Cnf['Make-Changelog::Options::binNMU']
export = Cnf['Make-Changelog::Options::export']
base_suite = Cnf['Make-Changelog::Options::Base-Suite']
binnmu = Cnf['Make-Changelog::Options::binNMU']
export = Cnf['Make-Changelog::Options::export']
if cnf.exportpath:
archive = session.query(Archive).filter_by(archive_name=Options['Archive']).one()
exportpath = os.path.join(Cnf['Dir::Export'], cnf.exportpath)
if cnf.exportpath:
archive = session.query(Archive).filter_by(archive_name=Options['Archive']).one()
exportpath = os.path.join(Cnf['Dir::Export'], cnf.exportpath)