status-report-scripts check_owners,1.1,1.2

Christian Iseli (c4chris) fedora-extras-commits at redhat.com
Tue Jul 11 20:59:44 UTC 2006


Author: c4chris

Update of /cvs/fedora/status-report-scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18014

Modified Files:
	check_owners 
Log Message:
Improve email address parsing.


Index: check_owners
===================================================================
RCS file: /cvs/fedora/status-report-scripts/check_owners,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- check_owners	19 Apr 2006 14:19:30 -0000	1.1
+++ check_owners	11 Jul 2006 20:59:42 -0000	1.2
@@ -13,24 +13,29 @@
   }
   my @F = split /\|/;
   if ($#F != 5) {
-    print STDERR "Bad number of columns here:\n$_";
+    print STDERR "Bad number of columns here:\n$_\n";
     next;
   }
   if (defined $P{$F[1]}) {
-    print STDERR "Package $F[1] is defined twice:\n$_";
+    print STDERR "Package $F[1] is defined twice:\n$_\n";
     next;
   }
   if ($F[0] ne "Fedora Extras") {
-    print STDERR "Component is not Fedora Extras:\n$_";
+    print STDERR "Component is not Fedora Extras:\n$_\n";
   }
-  if ($F[3] !~ /[@]/) {
-    print STDERR "initialowner does not look like an email address:\n$_";
+  if ($F[3] !~ /^[-a-z0-9._+]+[@][-a-z0-9._]+$/i) {
+    print STDERR "initialowner does not look like an email address:\n$_\n";
   }
-  if ($F[4] !~ /[@]/) {
-    print STDERR "initialqacontact does not look like an email address:\n$_";
+  if ($F[4] !~ /^[-a-z0-9._+]+[@][-a-z0-9._]+$/i) {
+    print STDERR "initialqacontact does not look like an email address:\n$_\n";
   }
-  if ($F[5] !~ /^\s*$/ && $F[5] !~ /[@]/) {
-    print STDERR "initialcclist does not look like an email address:\n$_";
+  if ($F[5] !~ /^\s*$/) {
+    my @A = split /,/, $F[5];
+    foreach my $e (@A) {
+      if ($e !~ /^[-a-z0-9._+]+[@][-a-z0-9._]+$/i) {
+	print STDERR "initialcclist does not look like an email address:\n$_\n";
+      }
+    }
   }
   $P{$F[1]} = $_;
 }




More information about the scm-commits mailing list