aboutsummaryrefslogtreecommitdiff
path: root/tatt
diff options
context:
space:
mode:
authorThomas Kahle <tomka@gentoo.org>2012-01-23 23:13:27 +0100
committerThomas Kahle <tomka@gentoo.org>2012-01-23 23:13:27 +0100
commitfca3ad7806a1cb928f4a444fc94cdcac2837f2e4 (patch)
tree2961a4413047bbf55f1580ab886ac4de313ac195 /tatt
parentSome updates to the manual and README (diff)
downloadtatt-fca3ad7806a1cb928f4a444fc94cdcac2837f2e4.tar.gz
tatt-fca3ad7806a1cb928f4a444fc94cdcac2837f2e4.tar.bz2
tatt-fca3ad7806a1cb928f4a444fc94cdcac2837f2e4.zip
Improve success-message script handling
Diffstat (limited to 'tatt')
-rw-r--r--tatt/dot-tatt-spec2
-rw-r--r--tatt/scriptwriter.py5
2 files changed, 4 insertions, 3 deletions
diff --git a/tatt/dot-tatt-spec b/tatt/dot-tatt-spec
index 406c33c..1a0182e 100644
--- a/tatt/dot-tatt-spec
+++ b/tatt/dot-tatt-spec
@@ -1,5 +1,5 @@
atom-regexp=string(default="=?[^\s:,;<>]+/\S+-[0-9]?\S+[0-9][^\s:,;<>]?[a-z]*")
-successmessage=string(default="Archtested on x86: Everything fine")
+successmessage=string(default="Archtested on @@ARCH@@: Everything fine")
ignoreprefix=string_list(default=list("elibc_","video_cards_","linguas_","kdeenablefinal","test","debug"))
template-dir=string(default="/usr/share/tatt/templates/")
unmaskfile=string(default="/etc/portage/package.keywords/archtest")
diff --git a/tatt/scriptwriter.py b/tatt/scriptwriter.py
index d40811a..64cbcae 100644
--- a/tatt/scriptwriter.py
+++ b/tatt/scriptwriter.py
@@ -98,7 +98,7 @@ def writerdepscript(job, packlist, config):
#######Write report script############
-def writesucessreportscript (job, bugnum, success):
+def writesucessreportscript (job, bugnum, config):
outfilename = (job + "-success.sh")
reportname = (job + ".report")
if os.path.isfile(outfilename):
@@ -106,7 +106,8 @@ def writesucessreportscript (job, bugnum, success):
outfile = open(outfilename,'w')
outfile.write("#!/bin/sh" + '\n')
outfile.write("if grep failed " + reportname + " >> /dev/null; then echo Failure found;\n")
- outfile.write("else bugz modify " + bugnum + ' -c' + "\"" + success + "\";\n")
+ succmess = config['successmessage'].replace("@@ARCH@@", config['arch'])
+ outfile.write("else bugz modify " + bugnum + ' -c' + "\"" + succmess + "\";\n")
outfile.write("fi;")
outfile.close()
print(("Success Report script written to " + outfilename))