Skip to content

Commit d0ef4bd

Browse files
committed
Group apparently removed items by working status.
This makes it easier to spot promotions in some cases.
1 parent 7244f34 commit d0ef4bd

File tree

2 files changed

+33
-18
lines changed

2 files changed

+33
-18
lines changed

makewn.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -502,20 +502,26 @@ def handle_new_software(shortname, description, is_clone, is_working):
502502
for shortname in renames:
503503
if shortname in old_working: del old_working[shortname]
504504
elif shortname in old_nonworking: del old_nonworking[shortname]
505-
removed = list()
506-
for shortname, description in old_working.items(): removed.append(description)
507-
for shortname, description in old_nonworking.items(): removed.append(description)
508-
removed.sort()
509-
510-
if renames or removed or added_working or added_nonworking or promoted:
505+
removed_working = list()
506+
removed_nonworking = list()
507+
for shortname, description in old_working.items(): removed_working.append(description)
508+
for shortname, description in old_nonworking.items(): removed_nonworking.append(description)
509+
removed_working.sort()
510+
removed_nonworking.sort()
511+
512+
if renames or removed_working or removed_nonworking or added_working or added_nonworking or promoted:
511513
self.output.write('%s (%s):\n' % (listname, filename))
512514
if renames:
513515
self.output.write(' Renames\n')
514516
for old_name, info in renames.items():
515517
self.output.write(' %s -> %s %s\n' % (old_name, info[1], info[0]))
516-
if removed:
517-
self.output.write(' Removed\n')
518-
for description in removed:
518+
if removed_working:
519+
self.output.write(' Removed (working)\n')
520+
for description in removed_working:
521+
self.output.write(' %s\n' % (description, ))
522+
if removed_nonworking:
523+
self.output.write(' Removed (non-working)\n')
524+
for description in removed_nonworking:
519525
self.output.write(' %s\n' % (description, ))
520526
if added_working:
521527
self.output.write(' Working\n')

newdrivers.py

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -273,27 +273,36 @@ def handleNewMachine(driver, description, is_clone, is_working):
273273
if (error_handler.errors > 0) or (error_handler.warnings > 0):
274274
sys.exit(1)
275275

276-
removed = list()
276+
removed_working = list()
277277
for driver in old_working:
278278
if (driver not in new_working) and (driver not in new_nonworking) and (driver not in renames):
279-
removed.append(old_working[driver])
279+
removed_working.append(old_working[driver])
280+
removed_working.sort()
281+
282+
removed_nonworking = list()
280283
for driver in old_nonworking:
281284
if (driver not in new_working) and (driver not in new_nonworking) and (driver not in renames):
282-
removed.append(old_nonworking[driver])
283-
removed.sort()
285+
removed_nonworking.append(old_nonworking[driver])
286+
removed_nonworking.sort()
284287

285288
output.write('Comparing %s to %s\n\n' % (oldbuild, newbuild))
286289

287290
if renames:
288291
output.write('Renames\n')
289292
for old_name, info in renames.items():
290-
output.write('%s -> %s %s\n' % (old_name, info[1], info[0]))
293+
output.write(' %s -> %s %s\n' % (old_name, info[1], info[0]))
294+
output.write('\n')
295+
296+
if removed_working:
297+
output.write('Removed (working)\n')
298+
for description in removed_working:
299+
output.write(' %s\n' % (description, ))
291300
output.write('\n')
292301

293-
if removed:
294-
output.write('Removed\n')
295-
for description in removed:
296-
output.write('%s\n' % (description, ))
302+
if removed_nonworking:
303+
output.write('Removed (non-working)\n')
304+
for description in removed_nonworking:
305+
output.write(' %s\n' % (description, ))
297306
output.write('\n')
298307

299308
printResult('New working systems', new_working_parents)

0 commit comments

Comments
 (0)