Skip to content
Snippets Groups Projects
Commit dc702a0a authored by Ole Streicher's avatar Ole Streicher
Browse files

Improve program output

parent 96643c65
No related branches found
No related tags found
No related merge requests found
......@@ -92,23 +92,26 @@ if args.udd:
else:
blend += aptcache(args.release, [args.dir, '/etc/blends'])
missing = blend.fix_dependencies()
missing = sorted(set(d.name for d in blend.fix_dependencies()))
wanted = sorted(set(d.name for d in itertools.chain(*(
itertools.chain(*(t.recommends + t.dependencies))
for t in blend.tasks))))
if args.suppressempty:
for task in blend.tasks[:]:
if len(task.recommends) == 0 and len(task.dependencies) == 0:
blend.tasks.remove(task)
if missing and args.missing:
missing = sorted(set(d.name for d in missing))
print('Missing {} packages downgraded to `suggests`:\n '
.format(len(missing))
+ '\n '.join(missing))
if missing:
if args.missing:
print('Downgraded {} missing packages to Suggests:\n '
.format(len(missing))
+ '\n '.join(missing))
else:
print('Downgraded {} missing packages to Suggests'
.format(len(missing)))
if args.wanted:
wanted = sorted(set(d.name for d in itertools.chain(*(
itertools.chain(*(t.recommends + t.dependencies))
for t in blend.tasks))))
print("Total {} packages in Depends or Recommend:\n "
.format(len(wanted))
+ '\n '.join(wanted))
......@@ -117,10 +120,20 @@ if args.gencontrol:
with open(os.path.join(args.dir, 'debian', 'control'), 'w') as fp:
fp.write('# This file is autogenerated. Do not edit!\n')
blend.gen_control().dump(fp, text_mode=True)
print("Generated {} for {} with {} using {} Depends+Recommends"
.format('debian/control',
args.release,
'udd' if args.udd else 'apt',
len(wanted)))
if args.taskdesc:
with open(os.path.join(args.dir, '{}-tasks.desc'.format(blend.name)), 'w') as fp:
blend.gen_task_desc(udeb=args.udebs).dump(fp, text_mode=True)
print("Generated {} for {} with {} using {} Depends+Recommends"
.format('debian/control',
args.release,
'udd' if args.udd else 'apt',
len(wanted)))
upgraded_tasks = list(filter(lambda task: task.format_upgraded, blend.tasks))
if upgraded_tasks:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment