[Blends-commit] [Git][blends-team/blends][experimental] Improve program output

Ole Streicher gitlab at salsa.debian.org
Fri Apr 13 15:35:28 UTC 2018


Ole Streicher pushed to branch experimental at Debian Blends Team / blends


Commits:
dc702a0a by Ole Streicher at 2018-04-13T17:35:21+02:00
Improve program output

- - - - -


1 changed file:

- devtools/blend-gen-control


Changes:

=====================================
devtools/blend-gen-control
=====================================
--- a/devtools/blend-gen-control
+++ b/devtools/blend-gen-control
@@ -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:



View it on GitLab: https://salsa.debian.org/blends-team/blends/commit/dc702a0a14a9dc16eb0a341d1c5019664c2c6a5b

---
View it on GitLab: https://salsa.debian.org/blends-team/blends/commit/dc702a0a14a9dc16eb0a341d1c5019664c2c6a5b
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/blends-commit/attachments/20180413/4ab052fd/attachment-0001.html>


More information about the Blends-commit mailing list