Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

get_maintainer: add --bug option to print bug reporting info

For example Documentation/adming-guide/bug-hunting.rst suggest using
get_maintainer.pl to get a list of maintainers and mailing lists to
report bugs to, while a number of subsystems and drivers explicitly use
the "B:" MAINTAINERS entry to direct bug reports at issue trackers
instead of mailing lists and people.

Add the --bug option to get_maintainer.pl to print the bug reporting
URIs, if any.

Cc: Joe Perches <joe@perches.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Joe Perches <joe@perches.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20240815113450.3397499-1-jani.nikula@intel.com

authored by

Jani Nikula and committed by
Jonathan Corbet
033964f1 748c3404

+15 -2
+15 -2
scripts/get_maintainer.pl
··· 54 54 my $scm = 0; 55 55 my $tree = 1; 56 56 my $web = 0; 57 + my $bug = 0; 57 58 my $subsystem = 0; 58 59 my $status = 0; 59 60 my $letters = ""; ··· 272 271 'scm!' => \$scm, 273 272 'tree!' => \$tree, 274 273 'web!' => \$web, 274 + 'bug!' => \$bug, 275 275 'letters=s' => \$letters, 276 276 'pattern-depth=i' => \$pattern_depth, 277 277 'k|keywords!' => \$keywords, ··· 322 320 $status = 0; 323 321 $subsystem = 0; 324 322 $web = 0; 323 + $bug = 0; 325 324 $keywords = 0; 326 325 $keywords_in_file = 0; 327 326 $interactive = 0; 328 327 } else { 329 - my $selections = $email + $scm + $status + $subsystem + $web; 328 + my $selections = $email + $scm + $status + $subsystem + $web + $bug; 330 329 if ($selections == 0) { 331 - die "$P: Missing required option: email, scm, status, subsystem or web\n"; 330 + die "$P: Missing required option: email, scm, status, subsystem, web or bug\n"; 332 331 } 333 332 } 334 333 ··· 634 631 my @list_to = (); 635 632 my @scm = (); 636 633 my @web = (); 634 + my @bug = (); 637 635 my @subsystem = (); 638 636 my @status = (); 639 637 my %deduplicate_name_hash = (); ··· 664 660 if ($web) { 665 661 @web = uniq(@web); 666 662 output(@web); 663 + } 664 + 665 + if ($bug) { 666 + @bug = uniq(@bug); 667 + output(@bug); 667 668 } 668 669 669 670 exit($exit); ··· 856 847 @list_to = (); 857 848 @scm = (); 858 849 @web = (); 850 + @bug = (); 859 851 @subsystem = (); 860 852 @status = (); 861 853 %deduplicate_name_hash = (); ··· 1079 1069 --status => print status if any 1080 1070 --subsystem => print subsystem name if any 1081 1071 --web => print website(s) if any 1072 + --bug => print bug reporting info if any 1082 1073 1083 1074 Output type options: 1084 1075 --separator [, ] => separator for multiple entries on 1 line ··· 1393 1382 push(@scm, $pvalue . $suffix); 1394 1383 } elsif ($ptype eq "W") { 1395 1384 push(@web, $pvalue . $suffix); 1385 + } elsif ($ptype eq "B") { 1386 + push(@bug, $pvalue . $suffix); 1396 1387 } elsif ($ptype eq "S") { 1397 1388 push(@status, $pvalue . $suffix); 1398 1389 }