From: agriffis Date: Fri, 25 Feb 2005 15:56:48 +0000 (-0000) Subject: strip GECOS #80011 X-Git-Tag: gentoolkit-0.2.4.3~322 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4ce4c27c7bbb5be9207aa9fb8885d0eb4276e5fc;p=gentoolkit.git strip GECOS #80011 svn path=/; revision=184 --- diff --git a/trunk/src/echangelog/ChangeLog b/trunk/src/echangelog/ChangeLog index 26ea9b4..dedff3f 100644 --- a/trunk/src/echangelog/ChangeLog +++ b/trunk/src/echangelog/ChangeLog @@ -1,3 +1,6 @@ +25 Feb 2005 Aron Griffis + * strip GECOS #80011 + 09 Nov 2004 Aron Griffis * change "cvs diff -fU 0" => "cvs -f diff U0" because -f is a global option, not a diff option diff --git a/trunk/src/echangelog/echangelog b/trunk/src/echangelog/echangelog index 01b77f4..7242c91 100644 --- a/trunk/src/echangelog/echangelog +++ b/trunk/src/echangelog/echangelog @@ -172,8 +172,11 @@ $input = Text::Wrap::fill('', '', $input) if ($input =~ /^.{80}/m); $input =~ s/^/ /gm; # add indentation # Prepend the user info to the input -$user = $ENV{'ECHANGELOG_USER'} || - sprintf("%s <%s\@gentoo.org>", (getpwuid($<))[6,0]); +unless ($user = $ENV{'ECHANGELOG_USER'}) { + my ($fullname, $username) = (getpwuid($<))[6,0]; + $fullname =~ s/,.*//; # remove GECOS, bug 80011 + $user = sprintf "%s <%s\@gentoo.org>", $fullname, $username; +} # Make sure that we didn't get "root" die "Please set ECHANGELOG_USER or run as non-root\n" if $user =~ / -1) { # <--- NOTE disabled via '0' - # Insert after the *version line - $text =~ s/^( \*\Q$version\E ) # find the *version line = $1 - (?:\.|\.ebuild)? # some poorly formed entries - \s+ ( \(.*\) ) # (date) = $2 - \s*\n(?=\ \ \d|\*|\z) # suck up trailing whitespace - /$1 $2\n\n$entry\n\n/mx - or die "Failed to insert new entry (2)\n"; -} elsif (!defined $version || $versions{$version} > -1) { +if (!defined $version || $versions{$version} > -1) { # Changing an existing patch or ebuild, no new version marker # required $text =~ s/^( .*? ) # grab header @@ -248,12 +233,10 @@ open O, '>ChangeLog.new' or die "Can't open ChangeLog.new for output: $!\n"; print O $text or die "Can't write ChangeLog.new: $!\n"; close O or die "Can't close ChangeLog.new: $!\n"; -# Update affected ebuild copyright dates -#for my $e (grep /\.ebuild$/, @files) { -# Update all ebuild copyright dates -- according to Mr_Bones_ this is -# the right thing to do -opendir D, '.' or die "Can't opendir .: $!\n"; -for my $e (grep /\.ebuild$/, readdir D) { +# Update affected ebuild copyright dates. There is no reason to update the +# copyright lines on ebuilds that haven't changed. I verified this with an IP +# lawyer. +for my $e (grep /\.ebuild$/, @files) { my ($etext, $netext); open E, "<$e" or warn("Can't read $e to update copyright year\n"), next; { local $/ = undef; $etext = ; } @@ -272,7 +255,6 @@ for my $e (grep /\.ebuild$/, readdir D) { system "diff -U 0 $e $e.new"; rename "$e.new", $e or warn("Can't rename $e.new: $!\n"); } -close D; # Move things around and show the ChangeLog diff system 'diff -Nu ChangeLog ChangeLog.new';