Gentoo Archives: gentoo-commits

From: "Heath Caldwell (hncaldwell)" <hncaldwell@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-admin/tenshi/files: tenshi-0.10-warn-logfile.patch tenshi-0.10-solo-queue-escalation.patch
Date: Tue, 02 Dec 2008 20:46:57
Message-Id: E1L7c90-0001sP-Qx@stork.gentoo.org
1 hncaldwell 08/12/02 20:46:54
2
3 Added: tenshi-0.10-warn-logfile.patch
4 tenshi-0.10-solo-queue-escalation.patch
5 Log:
6 Add tenshi-0.10-r3 with solo-queue-escalation and warn-logfile patches (fixes bug #243082)
7 (Portage version: 2.1.6_rc2/cvs/Linux 2.6.25-gentoo-r6-grey01 x86_64)
8
9 Revision Changes Path
10 1.1 app-admin/tenshi/files/tenshi-0.10-warn-logfile.patch
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/tenshi/files/tenshi-0.10-warn-logfile.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/tenshi/files/tenshi-0.10-warn-logfile.patch?rev=1.1&content-type=text/plain
14
15 Index: tenshi-0.10-warn-logfile.patch
16 ===================================================================
17 Submitted by: Heath Caldwell <hncaldwell@g.o>
18 Date: 2008-10-21
19 Initial Package Version: 0.10
20 Upstream Status: No response
21 Description: Warns on log files that tenshi can't open and continues monitoring the ones that it can, instead of just exiting.
22
23 diff -ur tenshi-0.10/tenshi tenshi-0.10.new/tenshi
24 --- tenshi-0.10/tenshi 2008-10-06 16:55:37.000000000 -0700
25 +++ tenshi-0.10.new/tenshi 2008-10-07 11:46:06.000000000 -0700
26 @@ -141,10 +141,22 @@
27 die RED "[ERROR] $main{'csv'}{'path'}: not executable";
28 }
29
30 + my @good_log_files;
31 foreach my $log (@log_files) {
32 - die RED "[ERROR] $log: no such file" if (! -f $log);
33 - die RED "[ERROR] $log: file not readable" if (! -r $log);
34 + unless (-f $log) {
35 + print STDERR RED "[WARNING] $log: no such file\n";
36 + next;
37 + }
38 +
39 + unless (-r $log) {
40 + print STDERR RED "[WARNING] $log: file not readable\n";
41 + next;
42 + }
43 +
44 + push @good_log_files, $log;
45 }
46 + @good_log_files > 0 or die RED "[ERROR] no readable log files";
47 + @log_files = @good_log_files;
48 }
49
50 #
51
52
53
54 1.1 app-admin/tenshi/files/tenshi-0.10-solo-queue-escalation.patch
55
56 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/tenshi/files/tenshi-0.10-solo-queue-escalation.patch?rev=1.1&view=markup
57 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/tenshi/files/tenshi-0.10-solo-queue-escalation.patch?rev=1.1&content-type=text/plain
58
59 Index: tenshi-0.10-solo-queue-escalation.patch
60 ===================================================================
61 Submitted by: Heath Caldwell <hncaldwell@g.o>
62 Date: 2008-10-21
63 Initial Package Version: 0.10
64 Upstream Status: Accepted to be included in next release
65 Description: Allows the leftmost queue to have an escalation number if it is the only queue mentioned.
66
67 diff -ur tenshi-0.10/tenshi tenshi-0.10.new/tenshi
68 --- tenshi-0.10/tenshi 2008-10-06 16:55:37.000000000 -0700
69 +++ tenshi-0.10.new/tenshi 2008-10-06 17:18:07.000000000 -0700
70 @@ -522,7 +522,7 @@
71 }
72 }
73
74 - if ($queue[0] =~ /:/) {
75 + if (@queue > 1 and $queue[0] =~ /:/) {
76 die RED "[ERROR] Left most queue in a multiple queue declaration can not have an escalation number\n";
77 }
78
79 diff -ur tenshi-0.10/tenshi.8 tenshi-0.10.new/tenshi.8
80 --- tenshi-0.10/tenshi.8 2008-03-13 04:31:12.000000000 -0700
81 +++ tenshi-0.10.new/tenshi.8 2008-10-06 17:09:36.000000000 -0700
82 @@ -337,16 +337,16 @@
83 regexp. The queue will receive the message that matched the regexp at the time
84 of escalation, with a count equal to the escalation number. The count of
85 messages matching the regexp will be reset when the left most queue mentioned
86 -in the queue list is mailed.The left most queue cannot have an escalation
87 -number. When the number of messages that match the regexp reaches the greatest
88 -escalation number mentioned, escalation will begin again into the escalation
89 -queues, modulus the greatest escalation number. For example, using the queues
90 -`a,b:10,c:50', when 10 messages match the regexp, a message will go into b,
91 -when 50 match, one will go into c. At 60, another will go into b, and at 100,
92 -another into c, 110 to b, 150 to c, and so on. Escalation numbers must be
93 -positive integers greater than zero and must be listed in increasing order from
94 -left to right. All queues without escalation numbers must be listed more left
95 -than the queues with escalation numbers.
96 +in the queue list is mailed. The left most queue cannot have an escalation
97 +number unless it is the only queue listed. When the number of messages that
98 +match the regexp reaches the greatest escalation number mentioned, escalation
99 +will begin again into the escalation queues, modulus the greatest escalation
100 +number. For example, using the queues `a,b:10,c:50', when 10 messages match the
101 +regexp, a message will go into b, when 50 match, one will go into c. At 60,
102 +another will go into b, and at 100, another into c, 110 to b, 150 to c, and so
103 +on. Escalation numbers must be positive integers greater than zero and must be
104 +listed in increasing order from left to right. All queues without escalation
105 +numbers must be listed more left than the queues with escalation numbers.
106
107 .br
108 The standard grouping operators