[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] get_maintainers.pl: Enable running the script on unikraft repos



Hi Lars,

On 16/08/2019 11:42, Lars Kurth wrote:
Unikraft repos follow the same syntax as xen.git with the
following exceptions:
* MAINTAINERS files are called MAINTAINERS.md
* M: ... etc blocks are preceded by whitespaces for rendering as
   markup files

There is an other difference. The "fallback" category is "UNIKRAFT GENERAL" and not "THE REST".


This change will
- load MAINTAINERS.md if MAINTAINERS is not present
- deal with indented M: ... blocks

One process question. Does it mean Unikraft folks will have to checkout Xen in order to use {add, get}_maintainers.pl? If so, would it make sense to have add_maintainers.pl and script_maintainers.pl in a separate repo that can be added as submodule?


Signed-off-by: Lars Kurth <lars.kurth@xxxxxxxxxx>
---
Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Cc: Jan Beulich <jbeulich@xxxxxxxx>
Cc: Julien Grall <julien.grall@xxxxxxx>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Cc: Tim Deegan <tim@xxxxxxx>
Cc: Wei Liu <wl@xxxxxxx>

CC: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
CC: Florian Schmidt <florian.schmidt@xxxxxxxxx>
CC: Felipe Huici <felipe.huici@xxxxxxxxx>
---
  scripts/get_maintainer.pl | 14 ++++++++++----
  1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index f1e9c904ee..bdb09f8f65 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -284,12 +284,18 @@ if (!top_of_tree($xen_path)) {
  my @typevalue = ();
  my %keyword_hash;
-open (my $maint, '<', "${xen_path}MAINTAINERS")
-    or die "$P: Can't open MAINTAINERS: $!\n";
+my $maint;
+my $maintainers_file = "MAINTAINERS";
+if (! open ($maint, '<', ${xen_path}.$maintainers_file)) {
+    $maintainers_file = "MAINTAINERS.md";
+    open ($maint, '<', ${xen_path}.$maintainers_file)
+        or die "$P: Can't open MAINTAINERS or MAINTAINERS.md: $!\n";
+}
+
  while (<$maint>) {
      my $line = $_;
- if ($line =~ m/^([A-Z]):\s*(.*)/) {
+    if ($line =~ m/^\s*([A-Z]):\s*(.*)/) {

As you allow space before the blocks M:, would not this catch the example at the beginning of the file?

        M: Mail patches to: FullName <address@domain>
        R: Designated reviewer: FullName <address@domain>

        my $type = $1;
        my $value = $2;
@@ -421,7 +427,7 @@ foreach my $file (@ARGV) {
      }
      if ($from_filename) {
        push(@files, $file);
-       if ($file ne "MAINTAINERS" && -f $file && ($keywords || $file_emails)) {
+       if ($file ne $maintainers_file && -f $file && ($keywords || 
$file_emails)) {
            open(my $f, '<', $file)
                or die "$P: Can't open $file: $!\n";
            my $text = do { local($/) ; <$f> };


Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.