@@ -397,19 +397,19 @@ def rename(self):
397397 @change ('M' )
398398 def modify (self ):
399399 """Generate summaries for modify actions."""
400- if len ( self . changes ) == 1 :
401- atom = next ( iter ( self .changes ))
400+ summaries = set ()
401+ for atom in self .changes :
402402 pkgs = self .repo .match (atom )
403403 self .old_repo .add_pkgs (pkgs )
404404 try :
405405 old_pkg = self .old_repo .match (atom )[0 ]
406406 new_pkg = pkgs [0 ]
407407 except IndexError : # pragma: no cover
408408 # broken ebuild should be caught during manifesting or scanning
409- return
409+ continue
410410
411411 if old_pkg .eapi in new_pkg .eapi .inherits [1 :]:
412- return f'update EAPI { old_pkg .eapi } -> { new_pkg .eapi } '
412+ summaries . add ( f'update EAPI { old_pkg .eapi } -> { new_pkg .eapi } ' )
413413 elif new_pkg .keywords != old_pkg .keywords :
414414 repo_stable = set (self .repo .config .arches_desc ['stable' ])
415415 new_keywords = set (new_pkg .keywords )
@@ -434,8 +434,9 @@ def modify(self):
434434 msg = f"{ action } for { ', ' .join (sorted (removed ))} "
435435
436436 if len (msg ) <= 50 :
437- return msg
438- return action
437+ summaries .add (msg )
438+ else :
439+ summaries .add (action )
439440 else :
440441 # use sourced bash env diffs to determine summaries
441442 old_env = old_pkg .environment .data .splitlines ()
@@ -458,10 +459,10 @@ def modify(self):
458459
459460 updated_vars = drop .keys () & add .keys ()
460461 if updated := sorted (watch_vars & updated_vars ):
461- return f"update { ', ' .join (updated )} "
462+ summaries . add ( f"update { ', ' .join (updated )} " )
462463 elif (target := targets & updated_vars ) and len (target ) == 1 :
463464 target = next (iter (target ))
464- py_re = lambda x : re .sub ( r'^python(\d+)_(\d+)$' , r'py\1.\2' , x )
465+ py_re = partial ( re .sub , r'^python(\d+)_(\d+)$' , r'py\1.\2' )
465466 use_expand = {py_re (use [len (target )+ 2 :])
466467 for use , _ in self .repo .use_expand_desc [use_expand_mapping [target ]]}
467468 if target in array_targets :
@@ -480,9 +481,11 @@ def modify(self):
480481 msg .append (f"disable { ', ' .join (sorted (dropped ))} " )
481482 msg = ' and ' .join (msg )
482483 if len (msg ) <= 50 :
483- return msg
484+ summaries . add ( msg )
484485 else :
485- return f'update { target } support'
486+ summaries .add (f'update { target } support' )
487+ if len (summaries ) == 1 :
488+ return next (iter (summaries ))
486489
487490
488491class GitChanges (UserDict ):
0 commit comments