Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:genpatches-misc commit in: scripts/, web/
Date: Wed, 25 Jun 2014 23:24:20
Message-Id: 1403738616.4c351394ebdcabafe794708f1f50def97f11c18c.mpagano@gentoo
1 commit: 4c351394ebdcabafe794708f1f50def97f11c18c
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 25 23:23:36 2014 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 25 23:23:36 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/linux-patches.git;a=commit;h=4c351394
7
8 Fixes for gpdoemail and email-announcement.pl
9
10 ---
11 scripts/gpdoemail | 2 +-
12 web/email-announcement.pl | 22 +++++++++++++++-------
13 2 files changed, 16 insertions(+), 8 deletions(-)
14
15 diff --git a/scripts/gpdoemail b/scripts/gpdoemail
16 index 558c320..42f67c4 100755
17 --- a/scripts/gpdoemail
18 +++ b/scripts/gpdoemail
19 @@ -12,7 +12,7 @@ email="${ECHANGELOG_USER#*<}"
20 email="${email%>}"
21
22 cd ${WEB_LOCAL}
23 -perl email-announcement.pl $1 ${KERNEL_NAME} |
24 +perl email-announcement.pl $1 ${KERNEL_NAME} ${LOCAL_TMP} ${REMOTE_BASE} |
25 ${SENDMAIL} -F \"${name}\" -f \"${email}\" gentoo-kernel@l.g.o
26
27
28
29 diff --git a/web/email-announcement.pl b/web/email-announcement.pl
30 index d618c58..53d6f95 100755
31 --- a/web/email-announcement.pl
32 +++ b/web/email-announcement.pl
33 @@ -6,6 +6,8 @@ use Cwd;
34
35 $tag = shift;
36 $kernel_name = shift;
37 +$LOCAL_TMP = shift;
38 +$REMOTE_BASE = shift;
39
40 if ($tag =~ m/(2\.6\.\d+)-(\d+)/) {
41 $ver = $1;
42 @@ -19,11 +21,17 @@ else { # support for kernels >= 3.0
43
44 $have_history = 0;
45
46 -# Try and find previous release
47 +$result = `cd $LOCAL_TMP`;
48 +$result = `git -C ${LOCAL_TMP}/linux-patches reset`;
49 +$result = `git clone $REMOTE_BASE ${LOCAL_TMP}/linux-patches`;
50 +
51 +# checkout branch
52 +$result = `git -C ${LOCAL_TMP}/linux-patches checkout ${tag}`;
53
54 +# Try and find previous release
55 if ($rel > 1) {
56 $oldtag = $ver.'-'.($rel-1);
57 - $cmd='git -C '.${LOCAL_PATCHES_TRUNK}.' rev-list '.$oldtag;
58 + $cmd='git -C '.${LOCAL_TMP}.'/linux-patches rev-list '.$oldtag;
59 @output = `$cmd`;
60
61 foreach $line (@output) {
62 @@ -39,12 +47,12 @@ if ($rel > 1) {
63
64
65 if ($have_history == 1) {
66 - $cmd='git --no-pager -C '.${LOCAL_PATCHES_TRUNK}.' log --pretty=format:"%s (%an)" --name-status '.$oldtag.'..'.$tag;
67 + $cmd='git --no-pager -C '.${LOCAL_TMP}.'/linux-patches log --pretty=format:"%s (%an)" --name-status '.$oldtag.'..'.$tag;
68 @log_lines = `$cmd`;
69 $have_history = 1;
70 }
71 else {
72 - $cmd='git --no-pager -C '.${LOCAL_PATCHES_TRUNK}.' log --pretty=format:"%s (%an)" --name-status '.$tag;
73 + $cmd='git --no-pager -C '.${LOCAL_TMP}.'/linux-patches log --pretty=format:"%s (%an)" --name-status '.$tag;
74 @log_lines = `$cmd`;
75 }
76 }
77 @@ -56,12 +64,12 @@ if ($rel > 1) {
78 # #$cmd = 'svn log -q --stop-on-copy '.$subversion_root.'/tags/'.$oldtag;
79 #
80 # # check out branch
81 -# printf("LOCAL_PATCHES_TRUNK is ${LOCAL_PATCHES_TRUNK}\n");
82 -# $cmd='git -C '.${LOCAL_PATCHES_TRUNK}.' checkout '.$ver;
83 +# printf("LOCAL_TMP is ${LOCAL_TMP}\n");
84 +# $cmd='git -C '.${LOCAL_TMP}.' checkout '.$ver;
85 # @result = `$cmd`;
86 #
87 # # get log in between tags
88 -# $cmd='git -C '.${LOCAL_PATCHES_TRUNK}.' log '.$oldtag.'..'.$tag.' --name-status';
89 +# $cmd='git -C '.${LOCAL_TMP}.' log '.$oldtag.'..'.$tag.' --name-status';
90 # printf (" cmd is $cmd\n");
91 #
92 # @log_lines = `$cmd`;