Date: Wed, 24 Apr 2013 11:56:43 -0500 From: Bryan Drewery <bdrewery@FreeBSD.org> To: Emanuel Haupt <ehaupt@FreeBSD.org> Cc: svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, ports-committers@freebsd.org Subject: Re: svn commit: r316453 - head/Tools/scripts Message-ID: <51780ECB.9080907@FreeBSD.org> In-Reply-To: <201304241654.r3OGsNNh022705@svn.freebsd.org> References: <201304241654.r3OGsNNh022705@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2EVMFQELLJHSJGLXDVDUI Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 4/24/2013 11:54 AM, Emanuel Haupt wrote: > Author: ehaupt > Date: Wed Apr 24 16:54:22 2013 > New Revision: 316453 > URL: http://svnweb.freebsd.org/changeset/ports/316453 >=20 > Log: > - Rework 'nice people' handling > - Properly handle non-default $MCom RCS strings Thanks! >=20 > Modified: > head/Tools/scripts/convert-makefile-header.pl >=20 > Modified: head/Tools/scripts/convert-makefile-header.pl > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/Tools/scripts/convert-makefile-header.pl Wed Apr 24 16:53:54 2= 013 (r316452) > +++ head/Tools/scripts/convert-makefile-header.pl Wed Apr 24 16:54:22 2= 013 (r316453) > @@ -28,7 +28,51 @@ Usage: $bn [OPTION] PORT > _ENOUSAGE > } > =20 > -my $nicepeople=3D"((\\s|<|^)(araujo|az|avilla|bapt|bdrewery|beat|brook= s|crees|eadler|flo|flz|garga|kuriyama|linimon|makc|rm|tabthorpe|wxs)\@fre= ebsd.org|cvs-src\@yandex\.ru|makc\@issp\.ac\.ru|villa\.alberto@|pgollucci= \@p6m7g8\.com|bsdkaffee@|baptiste\.daroussin\@gmail.com)"; > +# You may add yourself to the following list if you agree to waive on = the > +# "Created by" attribution > +sub get_nice_people() { > + my $committers=3D[ > + 'araujo', > + 'az', > + 'avilla', > + 'bapt', > + 'bdrewery', > + 'beat', > + 'brooks', > + 'crees', > + 'ehaupt', > + 'eadler', > + 'flo', > + 'flz', > + 'garga', > + 'kuriyama', > + 'linimon', > + 'makc', > + 'rm', > + 'tabthorpe', > + 'wxs' > + ]; > + > + # append FreeBSD.org domain to the list of committers > + map ($_ .=3D '\@FreeBSD\.org', @$committers); > + > + my $maintainers=3D[ > + 'cvs-src\@yandex\.ru', > + 'makc\@issp\.ac\.ru', > + 'villa\.alberto\@', > + 'pgollucci\@p6m7g8\.com', > + 'bsdkaffee\@', > + 'baptiste\.daroussin\@gmail\.com' > + ]; > + > + # merge committer and maintainer addresses > + my @nice_people=3D(@$committers, @$maintainers); > + > + # prepend regex > + map ($_ =3D '(\\s|<|^)' . $_, @nice_people); > + > + return \@nice_people; > +} > =20 > sub get_creator($) { > my $header=3Dshift; > @@ -43,20 +87,10 @@ sub get_creator($) { > return $creator; > } > =20 > -sub get_mcom($) { > - my $header=3Dshift; > - my $mcom; > - for my $line (@$header) { > - if ($line=3D~m'\$MCom:'i) { > - return $line; > - } > - } > - return ""; > -} > - > MAIN: { > # get options > my $opt=3D{}; > + my $nice_people=3Dget_nice_people(); > GetOptions($opt, 'help|h', 'rcsonly|r', 'createdby|c', 'nowrite|n'); > =20 > if(defined($opt->{help})) { > @@ -71,6 +105,7 @@ MAIN: { > for my $arg (@ARGV) { > my @header; > my @makefile; > + my @header_exception; > my $in_header=3D1; > if(-f "$arg/Makefile") { > my $mf=3D$arg . "/Makefile"; > @@ -83,6 +118,11 @@ MAIN: { > $in_header=3D0; > push(@makefile, $line); > } > + > + # tolerate $MCom RCS tags > + if($line=3D~m'\$MCom') { > + push(@header_exception, $line); > + } > } > close(F); > =20 > @@ -99,16 +139,24 @@ MAIN: { > print $outh "# \$FreeBSD\$\n"; > } elsif(defined($opt->{createdby}) || !defined($opt->{rcsonly})) { > my $creator=3Dget_creator(\@header); > - my $mcom=3Dget_mcom(\@header); > if(defined($creator)) { > - if ($creator!~m"$nicepeople"i) { > - print $outh "# Created by: $creator\n"; > + my $is_nice=3D0; > + for my $c (@$nice_people) { > + if($creator=3D~m"${c}") { > + $is_nice=3D1; > + last; > + } > } > + print $outh "# Created by: $creator\n" if(!$is_nice); > } else { > print STDERR "$mf creator not found. Reverting to RCS string only= =2E\n"; > } > print $outh "# \$FreeBSD\$\n"; > - print $outh $mcom; > + > + # append header exceptions > + for my $h (@header_exception) { > + print $outh $h . "\n"; > + } > } > =09 > for my $line (@makefile) { >=20 --=20 Regards, Bryan Drewery ------enig2EVMFQELLJHSJGLXDVDUI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJReA7PAAoJEG54KsA8mwz5+QUQAIhdVfzEtdyx6juFJfePrnV1 /PNOHLq4WUeGlfs6L+g7xZmXRmixwxY9uWKHzkSLOnfac+Jje5GA7pGk8CtyFJay ptxJ+p00xz6/kPiYftM+bLKNSc1gwXYdyf9H97zeLE1fiJb0Ku38T0GdpDrLzSMC FzcJnMuqwR5mpJzdJyVaMmu69OK3RrFaKkWmhSj9w7PrB0k+qp1NnWzz9VbBArtM bFYIWO5vLLxTAuIPYJ+riBuURtfFXgVpLnn0scSr81PD6Wqc9r2BPEQavZPNIoab hkbzQmZxstsncE9Mngr6glMToczf0ltJ01GMgVnWL7w49wBSxcz6FpiAsq7YAG+r DxK52GlgiOKguRef2dgLhFr0JB7LPBsu/bju2Srx6rt/osxsbWwA2VBPvn4EwMf8 g+i57n+zQRJegMyjosJ8CM2ovMWK9i4JNfUuub7Sx0wo6ActZvsqTkqIKMQMhYf2 Bh0OFdphQUS65trz7jRoVonfUEFxdeHy4gUIo3rlZuDSUGXpWD9kz7TomduEH3zn xiNjFZOGct9o5CkS5I2SmcnI9lWY5mY2SZsHegX13K2HH1pa8vMVV/aSBBqvnwJt BtG9DUhBNKJR3Iql+RY23U5o2zci5DU1HByJsl0y5Z3JpY7neacAoXm0sR/of8zl j67sFEwJB34W1Pzl5z8l =vT8w -----END PGP SIGNATURE----- ------enig2EVMFQELLJHSJGLXDVDUI--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51780ECB.9080907>