/[linux-patches]/genpatches-2.6-misc/web/email-announcement.pl
Gentoo

Contents of /genpatches-2.6-misc/web/email-announcement.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1959 - (show annotations) (download) (as text)
Tue Aug 9 12:52:53 2011 UTC (3 years, 1 month ago) by mpagano
File MIME type: text/x-perl
File size: 2289 byte(s)
Add support for genpatches email for >= 3.0 kernels
1 #!/usr/bin/perl
2 # Copyright 2005 Gentoo Foundation; Distributed under the GPL v2
3
4 use Cwd;
5 use gentoo_sources_web;
6
7 $tag = shift;
8 $kernel_name = shift;
9
10 if ($tag =~ m/(2\.6\.\d+)-(\d+)/) {
11 $ver = $1;
12 $rel = $2;
13 }
14 else { # support for kernels >= 3.0
15 $tag =~ m/(\d+\.\d+)-(\d+)/;
16 $ver = $1;
17 $rel = $2;
18 }
19
20 $have_history = 0;
21
22 # Try and find previous release
23 if ($rel > 1) {
24 $oldtag = $ver.'-'.($rel-1);
25 $cmd = 'svn log -q --stop-on-copy '.$subversion_root.'/tags/'.$oldtag;
26 @log_lines = `$cmd`;
27 $lastrev = 0;
28 foreach (@log_lines) {
29 next if $_ !~ /^r(\d+) \|/;
30 $lastrev = $1;
31 last;
32 }
33 }
34
35 if ($lastrev) {
36 @commits = _parse_log($tag, $lastrev);
37 $have_history = @commits;
38 }
39
40 $email .= "To: Gentoo Kernel List <gentoo-kernel\@lists.gentoo.org>\n";
41 $email .= "Subject: [ANNOUNCE] $kernel_name-$tag release\n";
42
43 $email .= "\nThis is an automated email announcing the release of $kernel_name-$tag\n\n";
44
45 if ($lastrev && $have_history) {
46 $email .= "\nCHANGES SINCE $oldtag\n";
47 $email .= "-----------------------\n\n";
48 foreach $rev (@commits) {
49 next if !$rev->{'rev'};
50 chomp $rev->{'logmsg'};
51 $email .= 'Revision '.$rev->{'rev'}.': ';
52 $email .= $rev->{'logmsg'}.' ('.$rev->{'author'}.')'."\n";
53 $email .= 'Added: '.$_."\n" foreach (@{$rev->{'actionA'}});
54 $email .= 'Modified: '.$_."\n" foreach (@{$rev->{'actionM'}});
55 $email .= 'Deleted: '.$_."\n" foreach (@{$rev->{'actionD'}});
56 $email .= "\n";
57 }
58 }
59
60 $email .= "\nPATCHES\n";
61 $email .= "-------\n\n";
62 $email .= "When the website updates, the complete patch list and split-out patches will be\n";
63 $email .= "available here:\n";
64 $email .= $website_base."/patches-".$tag.".htm\n";
65 $email .= $website_base."/tarballs/".$kernel_name."-".$tag.".base.tar.bz2\n";
66 $email .= $website_base."/tarballs/".$kernel_name."-".$tag.".extras.tar.bz2\n";
67
68 if ($kernel_name == "genpatches") {
69 $email .= "\n\nABOUT GENPATCHES\n";
70 $email .= "----------------\n\n";
71 $email .= "genpatches is the patchset applied to some kernels available in Portage.\n\n";
72 $email .= "For more information, see the genpatches homepage:\n";
73 $email .= $website_base."\n\n";
74 $email .= "For a simple example of how to use genpatches in your kernel ebuild, look at a\n";
75 $email .= "recent gentoo-sources-2.6.* ebuild.\n";
76 }
77
78 print $email;

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.20