1 |
commit: 611d2be4c6d9483a0ce91a71904b9729f507e57b |
2 |
Author: Christian Ruppert <idl0r <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Feb 25 20:13:51 2011 +0000 |
4 |
Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Feb 25 20:17:33 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=611d2be4 |
7 |
|
8 |
Fix a bug where writing the new ChangeLog faild if *only* the ChangeLog itself has been modified |
9 |
|
10 |
--- |
11 |
src/echangelog/echangelog | 10 +++++----- |
12 |
1 files changed, 5 insertions(+), 5 deletions(-) |
13 |
|
14 |
diff --git a/src/echangelog/echangelog b/src/echangelog/echangelog |
15 |
index fe21729..94f045e 100755 |
16 |
--- a/src/echangelog/echangelog |
17 |
+++ b/src/echangelog/echangelog |
18 |
@@ -745,11 +745,6 @@ if (@new_versions) { |
19 |
or die "Failed to insert new entry (3)\n"; |
20 |
} |
21 |
|
22 |
-# Write the new ChangeLog |
23 |
-open O, '>ChangeLog.new' or die "Can't open ChangeLog.new for output: $!\n"; |
24 |
-print O $text or die "Can't write ChangeLog.new: $!\n"; |
25 |
-close O or die "Can't close ChangeLog.new: $!\n"; |
26 |
- |
27 |
# Update affected ebuilds and some other files copyright dates. There is no reason to update the |
28 |
# copyright lines on ebuilds that haven't changed. I verified this with an IP |
29 |
# lawyer. (patches/diffs and binary files are excluded) |
30 |
@@ -781,6 +776,11 @@ for my $e (grep(!/\.(patch|diff)$/, @files)) { |
31 |
} |
32 |
} |
33 |
|
34 |
+# Write the new ChangeLog |
35 |
+open O, '>ChangeLog.new' or die "Can't open ChangeLog.new for output: $!\n"; |
36 |
+print O $text or die "Can't write ChangeLog.new: $!\n"; |
37 |
+close O or die "Can't close ChangeLog.new: $!\n"; |
38 |
+ |
39 |
# Move things around and show the ChangeLog diff |
40 |
system 'diff -Nu ChangeLog ChangeLog.new'; |
41 |
rename 'ChangeLog.new', 'ChangeLog' or die "Can't rename ChangeLog.new: $!\n"; |