get_maintainer: add --bug option to print bug reporting info
Subsystems (2)
PATCH 1/2 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.
--- scripts/get_maintainer.pl | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-)
scripts/get_maintainer.pl +15 -2
@@ -54,6 +54,7 @@ my $output_section_maxlen = 50; my $scm = 0; my $tree = 1; my $web = 0; +my $bug = 0; my $subsystem = 0; my $status = 0; my $letters = "";
@@ -271,6 +272,7 @@ if (!GetOptions( 'scm!' => \$scm, 'tree!' => \$tree, 'web!' => \$web, + 'bug!' => \$bug, 'letters=s' => \$letters, 'pattern-depth=i' => \$pattern_depth, 'k|keywords!' => \$keywords,
@@ -320,13 +322,14 @@ if ($sections || $letters ne "") { $status = 0; $subsystem = 0; $web = 0; + $bug = 0; $keywords = 0; $keywords_in_file = 0; $interactive = 0; } else { - my $selections = $email + $scm + $status + $subsystem + $web; + my $selections = $email + $scm + $status + $subsystem + $web + $bug; if ($selections == 0) { - die "$P: Missing required option: email, scm, status, subsystem or web\n"; + die "$P: Missing required option: email, scm, status, subsystem, web or bug\n"; } }
@@ -631,6 +634,7 @@ my %hash_list_to; my @list_to = (); my @scm = (); my @web = (); +my @bug = (); my @subsystem = (); my @status = (); my %deduplicate_name_hash = ();
@@ -662,6 +666,11 @@ if ($web) { output(@web); } +if ($bug) { + @bug = uniq(@bug); + output(@bug); +} + exit($exit); sub self_test {
@@ -847,6 +856,7 @@ sub get_maintainers { @list_to = (); @scm = (); @web = (); + @bug = (); @subsystem = (); @status = (); %deduplicate_name_hash = ();
@@ -1069,6 +1079,7 @@ MAINTAINER field selection options: --status => print status if any --subsystem => print subsystem name if any --web => print website(s) if any + --bug => print bug reporting info if any Output type options: --separator [, ] => separator for multiple entries on 1 line
@@ -1382,6 +1393,8 @@ sub add_categories { push(@scm, $pvalue . $suffix); } elsif ($ptype eq "W") { push(@web, $pvalue . $suffix); + } elsif ($ptype eq "B") { + push(@bug, $pvalue . $suffix); } elsif ($ptype eq "S") { push(@status, $pvalue . $suffix); }
Signature · 1 line
2.39.2
PATCH 2/2 Documentation: admin-guide: direct people to bug trackers, if specified
Update bug reporting info in bug-hunting.rst to direct people to driver/subsystem bug trackers, if explicitly specified with the MAINTAINERS "B:" entry. Use the new get_maintainer.pl --bug option to print the info.
--- Documentation/admin-guide/bug-hunting.rst | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
Documentation/admin-guide/bug-hunting.rst +9 -8
@@ -244,14 +244,14 @@ Reporting the bug Once you find where the bug happened, by inspecting its location, you could either try to fix it yourself or report it upstream. -In order to report it upstream, you should identify the mailing list -used for the development of the affected code. This can be done by using -the ``get_maintainer.pl`` script. +In order to report it upstream, you should identify the bug tracker, if any, or +mailing list used for the development of the affected code. This can be done by +using the ``get_maintainer.pl`` script. For example, if you find a bug at the gspca's sonixj.c file, you can get its maintainers with:: - $ ./scripts/get_maintainer.pl -f drivers/media/usb/gspca/sonixj.c + $ ./scripts/get_maintainer.pl --bug -f drivers/media/usb/gspca/sonixj.c Hans Verkuil <[email protected]> (odd fixer:GSPCA USB WEBCAM DRIVER,commit_signer:1/1=100%) Mauro Carvalho Chehab <[email protected]> (maintainer:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),commit_signer:1/1=100%) Tejun Heo <[email protected]> (commit_signer:1/1=100%)
@@ -267,11 +267,12 @@ Please notice that it will point to: - The driver maintainer (Hans Verkuil); - The subsystem maintainer (Mauro Carvalho Chehab); - The driver and/or subsystem mailing list ([email protected]); -- the Linux Kernel mailing list ([email protected]). +- The Linux Kernel mailing list ([email protected]); +- The bug reporting URIs for the driver/subsystem (none in the above example). -Usually, the fastest way to have your bug fixed is to report it to mailing -list used for the development of the code (linux-media ML) copying the -driver maintainer (Hans). +If the listing contains bug reporting URIs at the end, please prefer them over +email. Otherwise, please report bugs to the mailing list used for the +development of the code (linux-media ML) copying the driver maintainer (Hans). If you are totally stumped as to whom to send the report, and ``get_maintainer.pl`` didn't provide you anything useful, send it to
Signature · 1 line
2.39.2
Joe Perches
maintainerRe: [PATCH 2/2] Documentation: admin-guide: direct people to bug trackers, if specified
Quoted 22 lines · Jani Nikula
Update bug reporting info in
bug-hunting.rstto direct people to driver/subsystem bug trackers, if explicitly specified with theMAINTAINERS"B:" entry. Use the new get_maintainer.pl --bug option to print the info.Cc Joe Perches <[email protected]>Cc Jonathan Corbet <[email protected]>Signed-off-by Jani Nikula <[email protected]>--- Documentation/admin-guide/bug-hunting.rst | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)Documentation/admin-guide/bug-hunting.rst +0
-2@@ -244,14 +244,14 @@ Reporting the bug Once you find where the bug happened, by inspecting its location, you could either try to fix it yourself or report it upstream. -In order to report it upstream, you should identify the mailing list -used for the development of the affected code. This can be done by using
Documentation/admin-guide/bug-hunting.rst Reporting the bug · line 254
Quoted 10 lines
Documentation/admin-guide/bug-hunting.rst +4
-2-the ``get_maintainer.pl`` script. +In order to report it upstream, you should identify the bug tracker, if any, or +mailing list used for the development of the affected code. This can be done by +using the ``get_maintainer.pl`` script. For example, if you find a bug at the gspca's sonixj.c file, you can get its maintainers with:: - $ ./scripts/get_maintainer.pl -f drivers/media/usb/gspca/sonixj.c + $ ./scripts/get_maintainer.pl --bug -f drivers/media/usb/gspca/sonixj.c
Might not be the best use as B: entries are URIs and not email addresses
Maybe change the text above it too.
Documentation/admin-guide/bug-hunting.rst Please notice that it will point to: · line 271
Quoted 10 lines
Documentation/admin-guide/bug-hunting.rst +2
-1Hans Verkuil <[email protected]> (odd fixer:GSPCA USB WEBCAM DRIVER,commit_signer:1/1=100%) Mauro Carvalho Chehab <[email protected]> (maintainer:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),commit_signer:1/1=100%) Tejun Heo <[email protected]> (commit_signer:1/1=100%)@@ -267,11 +267,12 @@ Please notice that it will point to: - The driver maintainer (Hans Verkuil); - The subsystem maintainer (Mauro Carvalho Chehab); - The driver and/or subsystem mailing list ([email protected]); -- the Linux Kernel mailing list ([email protected]). +- The Linux Kernel mailing list ([email protected]); +- The bug reporting URIs for the driver/subsystem (none in the above example).
Maybe change the example to show a file/subsystem with a B: entry.
Joe Perches
maintainerRe: [PATCH 2/2] Documentation: admin-guide: direct people to bug trackers, if specified
In reply to Jani NikulaQuoted 19 lines · Jani Nikula
Update bug reporting info in
bug-hunting.rstto direct people to driver/subsystem bug trackers, if explicitly specified with theMAINTAINERS"B:" entry. Use the new get_maintainer.pl --bug option to print the info.Cc Joe Perches <[email protected]>Cc Jonathan Corbet <[email protected]>Signed-off-by Jani Nikula <[email protected]>--- Documentation/admin-guide/bug-hunting.rst | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)Documentation/admin-guide/bug-hunting.rst +0
-0@@ -244,14 +244,14 @@ Reporting the bug Once you find where the bug happened, by inspecting its location, you could either try to fix it yourself or report it upstream.
Documentation/admin-guide/bug-hunting.rst Reporting the bug · line 252
Quoted 10 lines
Documentation/admin-guide/bug-hunting.rst +3
-3-In order to report it upstream, you should identify the mailing list -used for the development of the affected code. This can be done by using -the ``get_maintainer.pl`` script. +In order to report it upstream, you should identify the bug tracker, if any, or +mailing list used for the development of the affected code. This can be done by +using the ``get_maintainer.pl`` script. For example, if you find a bug at the gspca's sonixj.c file, you can get its maintainers with::
Please use examples with and without B: entries.
Quoted 10 lines
Documentation/admin-guide/bug-hunting.rst +1
-1- $ ./scripts/get_maintainer.pl -f drivers/media/usb/gspca/sonixj.c + $ ./scripts/get_maintainer.pl --bug -f drivers/media/usb/gspca/sonixj.c Hans Verkuil <[email protected]> (odd fixer:GSPCA USB WEBCAM DRIVER,commit_signer:1/1=100%) Mauro Carvalho Chehab <[email protected]> (maintainer:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),commit_signer:1/1=100%) Tejun Heo <[email protected]> (commit_signer:1/1=100%)@@ -267,11 +267,12 @@ Please notice that it will point to: - The driver maintainer (Hans Verkuil); - The subsystem maintainer (Mauro Carvalho Chehab); - The driver and/or subsystem mailing list ([email protected]);
Documentation/admin-guide/bug-hunting.rst Please notice that it will point to: · line 275
Quoted 10 lines
Documentation/admin-guide/bug-hunting.rst +5
-4-- the Linux Kernel mailing list ([email protected]). +- The Linux Kernel mailing list ([email protected]); +- The bug reporting URIs for the driver/subsystem (none in the above example). -Usually, the fastest way to have your bug fixed is to report it to mailing -list used for the development of the code (linux-media ML) copying the -driver maintainer (Hans). +If the listing contains bug reporting URIs at the end, please prefer them over +email. Otherwise, please report bugs to the mailing list used for the +development of the code (linux-media ML) copying the driver maintainer (Hans).
I think that's quite poorly described as it could ignore any other reporter/developer or person that introduced the defect.
Quoted 8 lines · Jani Nikula
For example
Documentation/adming-guide/bug-hunting.rstsuggest 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:"MAINTAINERSentry 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.
Seems sensible, thanks.
Quoted 90 lines
Cc Joe Perches <[email protected]>Cc Jonathan Corbet <[email protected]>Signed-off-by Jani Nikula <[email protected]>--- scripts/get_maintainer.pl | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-)scripts/get_maintainer.pl +15
-2@@ -54,6 +54,7 @@ my $output_section_maxlen = 50; my $scm = 0; my $tree = 1; my $web = 0; +my $bug = 0; my $subsystem = 0; my $status = 0; my $letters = "";@@ -271,6 +272,7 @@ if (!GetOptions( 'scm!' => \$scm, 'tree!' => \$tree, 'web!' => \$web, + 'bug!' => \$bug, 'letters=s' => \$letters, 'pattern-depth=i' => \$pattern_depth, 'k|keywords!' => \$keywords,@@ -320,13 +322,14 @@ if ($sections || $letters ne "") { $status = 0; $subsystem = 0; $web = 0; + $bug = 0; $keywords = 0; $keywords_in_file = 0; $interactive = 0; } else { - my $selections = $email + $scm + $status + $subsystem + $web; + my $selections = $email + $scm + $status + $subsystem + $web + $bug; if ($selections == 0) { - die "$P: Missing required option: email, scm, status, subsystem or web\n"; + die "$P: Missing required option: email, scm, status, subsystem, web or bug\n"; } }@@ -631,6 +634,7 @@ my %hash_list_to; my @list_to = (); my @scm = (); my @web = (); +my @bug = (); my @subsystem = (); my @status = (); my %deduplicate_name_hash = ();@@ -662,6 +666,11 @@ if ($web) { output(@web); } +if ($bug) { + @bug = uniq(@bug); + output(@bug); +} + exit($exit); sub self_test {@@ -847,6 +856,7 @@ sub get_maintainers { @list_to = (); @scm = (); @web = (); + @bug = (); @subsystem = (); @status = (); %deduplicate_name_hash = ();@@ -1069,6 +1079,7 @@ MAINTAINER field selection options: --status => print status if any --subsystem => print subsystem name if any --web => print website(s) if any + --bug => print bug reporting info if any Output type options: --separator [, ] => separator for multiple entries on 1 line@@ -1382,6 +1393,8 @@ sub add_categories { push(@scm, $pvalue . $suffix); } elsif ($ptype eq "W") { push(@web, $pvalue . $suffix); + } elsif ($ptype eq "B") { + push(@bug, $pvalue . $suffix); } elsif ($ptype eq "S") { push(@status, $pvalue . $suffix); }
Quoted 9 lines · Jani Nikula
For example
Documentation/adming-guide/bug-hunting.rstsuggest 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:"MAINTAINERSentry 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.
Quoted 6 lines
Cc Joe Perches <[email protected]>Cc Jonathan Corbet <[email protected]>Signed-off-by Jani Nikula <[email protected]>--- scripts/get_maintainer.pl | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-)
I've applied both patches, thanks.
jon