if __name__ == '__main__': args = parse_options() start_time = time.localtime() if not args.skip_fetch: print('Fetching apt data (this will take some time)...') build_repo_caches(args.basedir, ros_repos, get_distro_arches(bin_arches, args.rosdistro)) else: print('Skip fetching apt data') csv_file = os.path.join(args.basedir, '%s.csv' % args.rosdistro) if not args.skip_csv: print('Generating .csv file...') render_csv(args.basedir, csv_file, args.rosdistro) elif not os.path.exists(csv_file): print('.csv file "%s" is missing. Call script without "--skip-csv".' % csv_file, file=sys.stderr) else: print('Skip generating .csv file') def metadata_builder(column_data): distro, jobtype = column_data.split('_', 1) data = { 'rosdistro': args.rosdistro, 'rosdistro_short': args.rosdistro[0].upper(), 'distro': distro, 'distro_short': distro[0].upper() } is_source = jobtype == 'source' if is_source:
distro_arches = [] if args.da: distro_arches = [tuple(a.split(',')) for a in args.da] elif args.distros: distro_arches = [(d, a) for d in args.distros for a in args.arches] else: distro_arches = get_distro_arches(args.arches, args.rosdistro) csv_file = os.path.join(args.basedir, '%s.csv' % args.rosdistro) if not args.skip_csv: print('Assembling apt version cache') version_cache = build_version_cache(args.basedir, args.rosdistro, distro_arches, ros_repos, update=not args.skip_fetch) print('Generating .csv file...') render_csv(version_cache, args.basedir, csv_file, args.rosdistro, distro_arches, ros_repos) elif not os.path.exists(csv_file): print('.csv file "%s" is missing. Call script without "--skip-csv".' %\ csv_file, file=sys.stderr) else: print('Skip generating .csv file') def metadata_builder(column_data): build_argstring = column_data.split('_') distro = build_argstring[0] arch = build_argstring[1] is_source = arch == 'source' data = { 'rosdistro': args.rosdistro, 'rosdistro_short': args.rosdistro[0].upper(), 'distro': distro,
distro_arches = [tuple(a.split(',')) for a in args.da] elif args.distros: distro_arches = [(d, a) for d in args.distros for a in args.arches] else: distro_arches = get_distro_arches(args.arches, args.rosdistro) csv_file = os.path.join(args.basedir, '%s.csv' % args.rosdistro) if not args.skip_csv: print('Assembling apt version cache') rd_data, apt_data = get_version_data(args.basedir, args.rosdistro, ros_repos, distro_arches, apt_update=not args.skip_fetch) print('Generating .csv file...') render_csv(rd_data, apt_data, csv_file, args.rosdistro, distro_arches, ros_repos) elif not os.path.exists(csv_file): print('.csv file "%s" is missing. Call script without "--skip-csv".' % csv_file, file=sys.stderr) else: print('Skip generating .csv file') def metadata_builder(column_data): build_argstring = column_data.split('_') distro = build_argstring[0] arch = build_argstring[1] is_source = arch == 'source' data = { 'rosdistro': args.rosdistro, 'rosdistro_short': args.rosdistro[0].upper(),
if __name__ == '__main__': args = parse_options() start_time = time.localtime() if not args.skip_fetch: print('Fetching apt data (this will take some time)...') build_repo_caches(args.basedir, ros_repos, get_distro_arches(bin_arches, args.rosdistro)) else: print('Skip fetching apt data') csv_file = os.path.join(args.basedir, '%s.csv' % args.rosdistro) if not args.skip_csv: print('Generating .csv file...') render_csv(args.basedir, csv_file, args.rosdistro) elif not os.path.exists(csv_file): print('.csv file "%s" is missing. Call script without "--skip-csv".' % csv_file, file=sys.stderr) else: print('Skip generating .csv file') def metadata_builder(column_data): distro, jobtype = column_data.split('_', 1) data = { 'rosdistro': args.rosdistro, 'rosdistro_short': args.rosdistro[0].upper(), 'distro': distro, 'distro_short': distro[0].upper() }
p = argparse.ArgumentParser(description='Generate the HTML page showing the package build status.') p.add_argument('--basedir', default='/tmp/build_status_page', help='Root directory containing ROS apt caches. This should be created using the build_caches command.') p.add_argument('--skip-csv', action='store_true', help='Skip generating .csv file.') p.add_argument('rosdistro', default='groovy', help='The ROS distro to generate the status page for (i.e. groovy).') return p.parse_args(args) if __name__ == '__main__': args = parse_options() start_time = time.localtime() csv_file = os.path.join(args.basedir, '%s.csv' % args.rosdistro) if not args.skip_csv: print('Generating .csv file...') render_csv(csv_file, args.rosdistro) elif not os.path.exists(csv_file): print('.csv file "%s" is missing. Call script without "--skip-csv".' % csv_file, file=sys.stderr) else: print('Skip generating .csv file') def metadata_builder(column_data): distro, jobtype = column_data.split('_', 1) data = { 'rosdistro': args.rosdistro, 'rosdistro_short': args.rosdistro[0].upper(), 'distro': distro, 'distro_short': distro[0].upper(), 'distro_ver': fedora_release_version(distro) } is_source = jobtype == 'SRPMS'
distro_arches = [] if args.da: distro_arches = [tuple(a.split(',')) for a in args.da] elif args.distros: distro_arches = [(d, a) for d in args.distros for a in args.arches] else: distro_arches = get_distro_arches(args.arches, args.rosdistro) csv_file = os.path.join(args.basedir, '%s.csv' % args.rosdistro) if not args.skip_csv: print('Assembling apt version cache') rd_data, apt_data = get_version_data(args.basedir, args.rosdistro, ros_repos, distro_arches, apt_update=not args.skip_fetch) print('Generating .csv file...') render_csv(rd_data, apt_data, csv_file, args.rosdistro, distro_arches, ros_repos) elif not os.path.exists(csv_file): print('.csv file "%s" is missing. Call script without "--skip-csv".' % csv_file, file=sys.stderr) else: print('Skip generating .csv file') def metadata_builder(column_data): build_argstring = column_data.split('_') distro = build_argstring[0] arch = build_argstring[1] is_source = arch == 'source' data = { 'rosdistro': args.rosdistro, 'rosdistro_short': args.rosdistro[0].upper(), 'distro': distro,