Add patch from genstef to fix issues from Bug 176337
authorfuzzyray <fuzzyray@gentoo.org>
Tue, 22 May 2007 21:07:14 +0000 (21:07 -0000)
committerfuzzyray <fuzzyray@gentoo.org>
Tue, 22 May 2007 21:07:14 +0000 (21:07 -0000)
svn path=/; revision=402

trunk/ChangeLog
trunk/src/echangelog/echangelog

index e5f00b8247bde16046f3aabe1913a1908ac095f6..e150ce2e23c26f05068d48dd7514e2c8dcbcd7b9 100644 (file)
@@ -1,3 +1,6 @@
+2007-05-21: Paul Varner <fuzzyray@gentoo.org>
+       * echangelog: Add patch from genstef to fix issues from Bug 176337
+
 2007-05-11: Paul Varner <fuzzyray@gentoo.org>
        * eclean: Changed permission check to see if you are either root or
        belong to the portage group (Bug #177385)
index 3e86860f6e3d0510a00857be89b3fd0660841af6..f86801ae31d80766cdcda9d490e129f16860397e 100644 (file)
@@ -410,6 +410,7 @@ close O                  or die "Can't close ChangeLog.new: $!\n";
 # copyright lines on ebuilds that haven't changed.  I verified this with an IP
 # lawyer.
 for my $e (grep /\.ebuild$/, @files) {
+  if (-s $e) {
     my ($etext, $netext);
     open E, "<$e" or warn("Can't read $e to update copyright year\n"), next;
     { local $/ = undef; $etext = <E>; }
@@ -427,6 +428,7 @@ for my $e (grep /\.ebuild$/, @files) {
     # Move things around and show the diff
     system "diff -U 0 $e $e.new";
     rename "$e.new", $e or warn("Can't rename $e.new: $!\n");
+  }
 }
 
 # Move things around and show the ChangeLog diff
@@ -442,7 +444,7 @@ if ($vcs eq "cvs") {
     }
 } elsif ($vcs eq "svn") {
     if (open F, ".svn/entries") {
-        system("svn add ChangeLog") unless (scalar grep /^ChangeLog$/, <F>);
+        system("svn add ChangeLog") unless (scalar grep /ChangeLog/, <F>);
     }
 } else {
     system("$vcs{$vcs}{add} ChangeLog 2>&1 >> /dev/null");