From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id E7E6B13877A for ; Tue, 24 Jun 2014 16:47:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3A3FFE08F0; Tue, 24 Jun 2014 16:47:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B4F44E08F0 for ; Tue, 24 Jun 2014 16:47:26 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 810BE33FBA3 for ; Tue, 24 Jun 2014 16:47:24 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 3E62318F67 for ; Tue, 24 Jun 2014 16:47:23 +0000 (UTC) From: "Mike Pagano" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Pagano" Message-ID: <1403628418.3eafe7fb22fbe3f85a32801db33aea94f05de1e7.mpagano@gentoo> Subject: [gentoo-commits] proj/linux-patches:genpatches-misc commit in: scripts/, web/ X-VCS-Repository: proj/linux-patches X-VCS-Files: scripts/gpdorelease web/email-announcement.pl X-VCS-Directories: scripts/ web/ X-VCS-Committer: mpagano X-VCS-Committer-Name: Mike Pagano X-VCS-Revision: 3eafe7fb22fbe3f85a32801db33aea94f05de1e7 X-VCS-Branch: genpatches-misc Date: Tue, 24 Jun 2014 16:47:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 19b5a2b0-ba0f-4152-b6bb-c23cd0a94684 X-Archives-Hash: 10fe6567f2a88d22e438556b26f691ac commit: 3eafe7fb22fbe3f85a32801db33aea94f05de1e7 Author: Mike Pagano gentoo org> AuthorDate: Tue Jun 24 16:46:58 2014 +0000 Commit: Mike Pagano gentoo org> CommitDate: Tue Jun 24 16:46:58 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/linux-patches.git;a=commit;h=3eafe7fb Add back sending announcement email. Add fixed email perl script. --- scripts/gpdorelease | 2 +- web/email-announcement.pl | 112 +++++++++++++++++++++++++++++++--------------- 2 files changed, 78 insertions(+), 36 deletions(-) diff --git a/scripts/gpdorelease b/scripts/gpdorelease index 4625190..bec5650 100755 --- a/scripts/gpdorelease +++ b/scripts/gpdorelease @@ -117,4 +117,4 @@ scp /tmp/${TARBALL_BASENAME}-$newfullver.* ${USERNAME}@dev.gentoo.org:/space/dis # gpdoweb #fi -#[[ ${DO_EMAIL_ANNOUNCEMENT} == "yes" ]] && gpdoemail $newfullver $KERNEL_NAME +[[ ${DO_EMAIL_ANNOUNCEMENT} == "yes" ]] && gpdoemail $newfullver $KERNEL_NAME diff --git a/web/email-announcement.pl b/web/email-announcement.pl index 573c59a..d618c58 100755 --- a/web/email-announcement.pl +++ b/web/email-announcement.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -# Copyright 2005 Gentoo Foundation; Distributed under the GPL v2 +# Copyright 2014 Gentoo Foundation; Distributed under the GPL v2 use Cwd; -use gentoo_sources_web; +#use gentoo_sources_web; $tag = shift; $kernel_name = shift; @@ -20,54 +20,96 @@ else { # support for kernels >= 3.0 $have_history = 0; # Try and find previous release + if ($rel > 1) { $oldtag = $ver.'-'.($rel-1); - $cmd = 'svn log -q --stop-on-copy '.$subversion_root.'/tags/'.$oldtag; - @log_lines = `$cmd`; - $lastrev = 0; - foreach (@log_lines) { - next if $_ !~ /^r(\d+) \|/; - $lastrev = $1; - last; - } -} + $cmd='git -C '.${LOCAL_PATCHES_TRUNK}.' rev-list '.$oldtag; + @output = `$cmd`; + + foreach $line (@output) { + $have_history = 1; + if (index($line, "fatal") != -1) { + $have_history =0; + } + if ($have_history == 0) { + break; + } + } + -if ($lastrev) { - @commits = _parse_log($tag, $lastrev); - $have_history = @commits; + + if ($have_history == 1) { + $cmd='git --no-pager -C '.${LOCAL_PATCHES_TRUNK}.' log --pretty=format:"%s (%an)" --name-status '.$oldtag.'..'.$tag; + @log_lines = `$cmd`; + $have_history = 1; + } + else { + $cmd='git --no-pager -C '.${LOCAL_PATCHES_TRUNK}.' log --pretty=format:"%s (%an)" --name-status '.$tag; + @log_lines = `$cmd`; + } } -local $ext; -$ext = get_tarball_ext($tag); +#if ($rel > 1) { +# $oldtag = $ver.'-'.($rel-1); +# #$cmd = 'svn log -q --stop-on-copy '.$subversion_root.'/tags/'.$oldtag; +# #$cmd = 'svn log -q --stop-on-copy '.$subversion_root.'/tags/'.$oldtag; +# +# # check out branch +# printf("LOCAL_PATCHES_TRUNK is ${LOCAL_PATCHES_TRUNK}\n"); +# $cmd='git -C '.${LOCAL_PATCHES_TRUNK}.' checkout '.$ver; +# @result = `$cmd`; +# +# # get log in between tags +# $cmd='git -C '.${LOCAL_PATCHES_TRUNK}.' log '.$oldtag.'..'.$tag.' --name-status'; +# printf (" cmd is $cmd\n"); +# +# @log_lines = `$cmd`; +# $lastrev = 0; +# foreach (@log_lines) { +# next if $_ !~ /^r(\d+) \|/; +# $lastrev = $1; +# last; +# } +#} +# +#printf("lastrev is $lastrev\n"); +# +#if ($lastrev) { +# printf("inside lastrev\n"); +# @commits = _parse_log($tag, $lastrev); +# $have_history = @commits; +#} +# +#local $ext; +#$ext = get_tarball_ext($tag); +# $email .= "To: Gentoo Kernel List \n"; $email .= "Subject: [ANNOUNCE] $kernel_name-$tag release\n"; $email .= "\nThis is an automated email announcing the release of $kernel_name-$tag\n\n"; -if ($lastrev && $have_history) { +if ($have_history) { $email .= "\nCHANGES SINCE $oldtag\n"; +} +else { + $email .= "\nCHANGES\n"; +} $email .= "-----------------------\n\n"; - foreach $rev (@commits) { - next if !$rev->{'rev'}; - chomp $rev->{'logmsg'}; - $email .= 'Revision '.$rev->{'rev'}.': '; - $email .= $rev->{'logmsg'}.' ('.$rev->{'author'}.')'."\n"; - $email .= 'Added: '.$_."\n" foreach (@{$rev->{'actionA'}}); - $email .= 'Modified: '.$_."\n" foreach (@{$rev->{'actionM'}}); - $email .= 'Deleted: '.$_."\n" foreach (@{$rev->{'actionD'}}); - $email .= "\n"; + foreach $line (@log_lines) { + if (index($line, "0000_README") == -1) { + $email .= "$line"; + } } -} -$email .= "\nPATCHES\n"; -$email .= "-------\n\n"; -$email .= "When the website updates, the complete patch list and split-out patches will be\n"; -$email .= "available here:\n"; -$email .= $website_base."/patches-".$tag.".htm\n"; -$email .= $website_base."/tarballs/".$kernel_name."-".$tag.".base.tar".$ext."\n"; -$email .= $website_base."/tarballs/".$kernel_name."-".$tag.".extras.tar".$ext."\n"; -$email .= $website_base."/tarballs/".$kernel_name."-".$tag.".experimental.tar".$ext."\n"; +#$email .= "\nPATCHES\n"; +#$email .= "-------\n\n"; +#$email .= "When the website updates, the complete patch list and split-out patches will be\n"; +#$email .= "available here:\n"; +#$email .= $website_base."/patches-".$tag.".htm\n"; +#$email .= $website_base."/tarballs/".$kernel_name."-".$tag.".base.tar".$ext."\n"; +#$email .= $website_base."/tarballs/".$kernel_name."-".$tag.".extras.tar".$ext."\n"; +#$email .= $website_base."/tarballs/".$kernel_name."-".$tag.".experimental.tar".$ext."\n"; if ($kernel_name == "genpatches") { $email .= "\n\nABOUT GENPATCHES\n";