Gentoo Archives: gentoo-commits

From: Christian Ruppert <idl0r@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gentoolkit:gentoolkit-dev commit in: src/echangelog/
Date: Fri, 25 Feb 2011 20:52:09
Message-Id: e34afa6e3da2ed329104a14eb957fb05326c437f.idl0r@gentoo
1 commit: e34afa6e3da2ed329104a14eb957fb05326c437f
2 Author: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 25 20:39:55 2011 +0000
4 Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 25 20:39:55 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=e34afa6e
7
8 Fix sorting again, bug 336390
9
10 ---
11 src/echangelog/echangelog | 14 ++++++++------
12 1 files changed, 8 insertions(+), 6 deletions(-)
13
14 diff --git a/src/echangelog/echangelog b/src/echangelog/echangelog
15 index 94f045e..273c5db 100755
16 --- a/src/echangelog/echangelog
17 +++ b/src/echangelog/echangelog
18 @@ -612,12 +612,8 @@ if (($vcs eq "svn" or $vcs eq "hg") and (@ebuilds)) {
19 # not. Trim them from @new_versions in that case.
20 @new_versions = grep { $text !~ /^\*\Q$_\E\s/m } @new_versions;
21
22 -# Check if we have any files left, otherwise re-insert ebuild list
23 -# (of course, both might be empty anyway)
24 -@files = @ebuilds unless (@files);
25 -
26 # Allow ChangeLog entries with no changed files, but give a fat warning
27 -unless (@files) {
28 +if (!@files && !@ebuilds) {
29 print STDERR "**\n";
30 print STDERR "** NOTE: No non-trivial changed files found. Normally echangelog\n";
31 print STDERR "** should be run after all affected files have been added and/or\n";
32 @@ -718,7 +714,13 @@ else {
33 die "Please set ECHANGELOG_USER or run as non-root\n" if $user =~ /<root@/;
34
35 $entry = "$date; $user ";
36 -$entry .= join ', ', sort sortfunc map("$actions{$_}$_", @files);
37 +if(@ebuilds) {
38 + $entry .= join(', ', sort sortfunc map("$actions{$_}$_", @ebuilds));
39 + $entry .= ", ".join(', ', sort sortfunc map("$actions{$_}$_", @files)) if @files;
40 +}
41 +else {
42 + $entry .= join ', ', sort sortfunc map("$actions{$_}$_", @files);
43 +}
44 $entry .= ':';
45 $entry = Text::Wrap::fill(' ', ' ', $entry); # does not append a \n
46 $entry .= "\n$input"; # append user input