commit-womb
[Top][All Lists]
Advanced

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

[commit-womb] gnumaint gm-check.pl gm-read.pl gnupackages.txt...


From: karl
Subject: [commit-womb] gnumaint gm-check.pl gm-read.pl gnupackages.txt...
Date: Mon, 25 Feb 2013 17:41:42 +0000

CVSROOT:        /sources/womb
Module name:    gnumaint
Changes by:     karl <karl>     13/02/25 17:41:42

Modified files:
        .              : gm-check.pl gm-read.pl gnupackages.txt Makefile 

Log message:
        first cut at checking ftp-upload email address consistency

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnumaint/gm-check.pl?cvsroot=womb&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnumaint/gm-read.pl?cvsroot=womb&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/gnumaint/gnupackages.txt?cvsroot=womb&r1=1.141&r2=1.142
http://cvs.savannah.gnu.org/viewcvs/gnumaint/Makefile?cvsroot=womb&r1=1.44&r2=1.45

Patches:
Index: gm-check.pl
===================================================================
RCS file: /sources/womb/gnumaint/gm-check.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- gm-check.pl 8 Feb 2013 19:27:59 -0000       1.1
+++ gm-check.pl 25 Feb 2013 17:41:42 -0000      1.2
@@ -1,4 +1,4 @@
-# $Id: gm-check.pl,v 1.1 2013/02/08 19:27:59 karl Exp $
+# $Id: gm-check.pl,v 1.2 2013/02/25 17:41:42 karl Exp $
 # The check actions for the gm script (see --help message).
 # 
 # Copyright 2007, 2008, 2009, 2010, 2012, 2013
@@ -117,34 +117,53 @@
 
 
 
-# Return list of entries in the ftp listing that are not in the official
-# list of packages.  (Implementation not finished.)
+# Return list of email addresses or packages in the ftp-upload setup
+# that are not in maintainers.
 # 
 sub check_ftpupload_ {
   my @ret = ();
   
   my %maint_file = &read_maintainers ("by-package");
-  my %ftpup_file = &read_ftpupload_email ();
-  
-  for my $m (keys %maint_file) {
-    if (exists $ftpup_file{$m}) {
-      # xxtodo: the comparison
-      delete $maint_file{$m};
-      delete $ftpup_file{$m};
-    }
-  }
+  my %ftpupload_file = &read_ftpupload_email ();
   
-  for my $p (sort keys %ftpup_file) {
+  for my $p (sort keys %ftpupload_file) {
+    # The ftp-upload package itself better be in the maintainers file.
+    # (Many packages do not release through ftp.gnu.org, unfortunately,
+    #  so there is no use in worrying about the reverse.)
+    if (! exists $maint_file{$p}) {
     push (@ret, "$FTPUPLOAD_EMAIL_FILE: not in maintainers: $p");
+      next;
   }
   
-  # Many packages do not release through ftp.gnu.org, unfortunately,
-  # so there is no use in worrying about this list.
-  #for my $p (sort keys %maint_file) {
-  #  next if &skip_pkg_p ($p);
-  #  push (@ret, "$MAINTAINERS_FILE:$maint_file{$p}[0]->{lineno}: "
-  #              . "$p not in ftp-upload email");
-  #}
+    # see if we can find each ftp-upload email in maintainers.
+   FTP_EMAIL:
+    for my $ftp_email (split (" ", $ftpupload_file{$p})) {
+      
+      # for each maintainer of this package ...
+      my @maint_refs = @{$maint_file{$p}};
+      for my $m (@maint_refs) {
+
+        # for each of the keys that have email values ...
+        for my $mkey ("email", "privateemail", "altemail", "bademail") {
+          my @mval = split (/\|/, $m->{$mkey}); # split multiple vals
+
+          # for each value of this key ...
+          for my $mval (@mval) {
+            if ($mval eq $ftp_email) {
+              if ($mkey eq "bademail") {
+                warn "$p: ftp email $ftp_email known bad!\n\n";
+              } else {
+                warn "$p: good, found $mval in $mkey\n";
+              }
+              next FTP_EMAIL;
+            }
+          }  # each of multiple email values
+        }    # each possible email key
+      }      # each maintainer
+      warn "$p: did not find $ftp_email\n";
+      warn "\n";
+    }        # each ftp-upload email for this package
+  }          # each ftp-upload package
   
   return @ret;
 }

Index: gm-read.pl
===================================================================
RCS file: /sources/womb/gnumaint/gm-read.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- gm-read.pl  8 Feb 2013 19:28:00 -0000       1.6
+++ gm-read.pl  25 Feb 2013 17:41:42 -0000      1.7
@@ -1,4 +1,4 @@
-# $Id: gm-read.pl,v 1.6 2013/02/08 19:28:00 karl Exp $
+# $Id: gm-read.pl,v 1.7 2013/02/25 17:41:42 karl Exp $
 # Subroutines for gm script that read various external data file.
 # 
 # Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013
@@ -562,6 +562,8 @@
 # package names and the values are a list of maintainer hash references.
 # With "by-maintainer", the keys are maintainer (real) names and the
 # values are hash references with their information.
+# If a field occurs more than once in a given maintainer's entry,
+# the values are separated by a |.
 # 
 # Special maintainer keys we synthesize, i.e., that are not in the
 # actual maintainers file:

Index: gnupackages.txt
===================================================================
RCS file: /sources/womb/gnumaint/gnupackages.txt,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -b -r1.141 -r1.142
--- gnupackages.txt     21 Feb 2013 22:56:19 -0000      1.141
+++ gnupackages.txt     25 Feb 2013 17:41:42 -0000      1.142
@@ -1,4 +1,4 @@
-# $Id: gnupackages.txt,v 1.141 2013/02/21 22:56:19 karl Exp $
+# $Id: gnupackages.txt,v 1.142 2013/02/25 17:41:42 karl Exp $
 # Public domain.
 # 
 # This file is maintained in the CVS repository of GNU womb,
@@ -162,7 +162,7 @@
 doc-summary: Automated program generator
 doc-url: /software/autogen/manual/
 gplv3-status: done-in-5.9.5
-activity-status: ok 20130104 (5.17.1)
+activity-status: ok 20130223 (5.17.2)
 
 package: automake
 copyright-holder: fsf-no-reply
@@ -2275,7 +2275,7 @@
 doc-shop: GNU MDK
 doc-shop: http://shop.fsf.org/product/gnu-mdk/
 gplv3-status: done-in-1.2.4-21mar08
-activity-status: ok 20101009 (1.2.6)
+activity-status: ok 20130224 (1.2.7)
 
 package: mediagoblin
 logo: http://mediagoblin.org/i/mediagoblin_mascot_attempt1.png
@@ -2457,7 +2457,7 @@
 doc-summary: High-level language for numerical computation
 doc-url: /software/octave/support.html
 gplv3-status: done-in-3.0.1 (licensing #345079)
-activity-status: ok 20120904 (3.6.3)
+activity-status: ok 20130221 (3.6.4)
 
 package: oleo
 copyright-holder: fsf-no-reply
@@ -2512,7 +2512,7 @@
 doc-summary: Build and execute command lines in parallel
 doc-url: /software/parallel/man.html
 gplv3-status: done-in-20100424
-activity-status: ok 20130122 (20130122)
+activity-status: ok 20130221 (20130222)
 
 package: parted
 copyright-holder: fsf-no-reply

Index: Makefile
===================================================================
RCS file: /sources/womb/gnumaint/Makefile,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- Makefile    8 Feb 2013 19:27:59 -0000       1.44
+++ Makefile    25 Feb 2013 17:41:42 -0000      1.45
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.44 2013/02/08 19:27:59 karl Exp $
+# $Id: Makefile,v 1.45 2013/02/25 17:41:42 karl Exp $
 # Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013
 # Free Software Foundation, Inc.
 #
@@ -70,6 +70,13 @@
 test-checkftp-upload cfu:
        gm check ftpupload
 
+test-checkftp ftp:
+       gm check ftplisting
+       
+test-checksv sv:
+       gm check savannah
+
+# 
 creport:
        @printf "total "; gm generate maintainers bypackage \
                          | grep ' - ' | grep -v ' (generic)' | wc -l
@@ -85,11 +92,11 @@
 
 #      | sed 's/-.*//' \
        
-test-checkftp ftp:
-       gm check ftplisting
-       
-test-checksv sv:
-       gm check savannah
+maint-field-check:
+       sed 1,/`printf '\f'`/d maintainers \
+       | sed s/#.*// | 
+       | sed -n 's/^\([^ ]*\):.*/\1/p' \
+       | sort | uniq -c | sort -n
 
 test-listmaint:
        gnumaint list maintainers $(sep)
@@ -151,4 +158,3 @@
 ## list of all packages derived from the Free Software Directory.
 #pkgnames.fromdir: gnufsd $(dircvs)/Entries
 #      $< byname >$@
-#



reply via email to

[Prev in Thread] Current Thread [Next in Thread]