diff options
| author | agriffis <agriffis@gentoo.org> | 2005-02-25 15:56:48 +0000 |
|---|---|---|
| committer | agriffis <agriffis@gentoo.org> | 2005-02-25 15:56:48 +0000 |
| commit | 4ce4c27c7bbb5be9207aa9fb8885d0eb4276e5fc (patch) | |
| tree | 9f0f3e594f7aab519f9e24def6ca6c1da1cc324c /trunk/src | |
| parent | 506daf785944b7312b1e6a989bde6913eaff8269 (diff) | |
| download | gentoolkit-4ce4c27c7bbb5be9207aa9fb8885d0eb4276e5fc.tar.gz | |
strip GECOS #80011
svn path=/; revision=184
Diffstat (limited to 'trunk/src')
| -rw-r--r-- | trunk/src/echangelog/ChangeLog | 3 | ||||
| -rw-r--r-- | trunk/src/echangelog/echangelog | 38 |
2 files changed, 13 insertions, 28 deletions
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 <agriffis@gentoo.org> + * strip GECOS #80011 + 09 Nov 2004 Aron Griffis <agriffis@gentoo.org> * 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 =~ /<root@/; $date = strftime("%d %b %Y", localtime); @@ -199,25 +202,7 @@ if (%versions) { # front of a dated entry), so it needs to be replaced with a # double carriage-return. This helps to normalize the spacing in # the ChangeLogs. -# -# NOTE: The first two branches here are disabled via '&& 0' -# because they use the new but unsanctioned ChangeLog format. -if (0 && !defined $version) { # <--- NOTE disabled via '0' - # Changing a patch or something, not an ebuild, so put the entry - # after the first *version line (really guessing) - $text =~ s/^( \*.*? ) # find the *version line - \s*\n(?=\ \ \d|\*|\z) # suck up trailing whitespace - /$1\n\n$entry\n\n/mx - or die "Failed to insert new entry (1)\n"; -} elsif (0 && $versions{$version} > -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 = <E>; } @@ -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'; |
