aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kahle <tom111@gmx.de>2011-09-18 20:42:28 +0100
committerThomas Kahle <tom111@gmx.de>2011-09-18 20:42:28 +0100
commit64a5e50c3a435bab85a369489fc94d3d5c91db03 (patch)
tree8c6829c418b89f0dbfbee01a1b8c9eadb08e43df /scripts
parentMake commit script more relocatable. (diff)
downloadtatt-64a5e50c3a435bab85a369489fc94d3d5c91db03.tar.gz
tatt-64a5e50c3a435bab85a369489fc94d3d5c91db03.tar.bz2
tatt-64a5e50c3a435bab85a369489fc94d3d5c91db03.zip
First working version of tatt-bugbrowser
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/tatt36
1 files changed, 27 insertions, 9 deletions
diff --git a/scripts/tatt b/scripts/tatt
index 0251100..88938f1 100755
--- a/scripts/tatt
+++ b/scripts/tatt
@@ -14,11 +14,12 @@ from pkg_resources import resource_filename
from tatt.gentooPackage import gentooPackage as gP
-from tatt.packageFinder import *
+import tatt.packageFinder
from tatt.scriptwriter import writeusecombiscript as writeUSE
from tatt.scriptwriter import writerdepscript as writeRdeps
from tatt.scriptwriter import writesucessreportscript as writeSuccess
from tatt.scriptwriter import writecommitscript as writeCommit
+from tatt.bugbrowser import launch_browser as launch_browser
########### Generate a global config obj, reading from ~/.tatt ################
# resource_filename will give us platform-independent access to the specfile
@@ -31,7 +32,11 @@ validator = Validator()
result = config.validate(validator)
if result != True:
- print('Config file validation failed!')
+ print "Config file validation failed!"
+ print "The following items could not be parsed"
+ for k in result.keys():
+ if result[k] == False:
+ print k
sys.exit(1)
######### Main program starts here ###############
@@ -55,11 +60,6 @@ parser.add_option("-f", "--file",
dest="infile",
action="store"
)
-# parser.add_option("-t", "--test",
-# help="run emerge commands with FEATURES=\"test\"",
-# dest="feature_test",
-# action="store_true",
-# default = True)
parser.add_option("-j", "--jobname",
help="name for the job, prefix of output files",
dest="jobname",
@@ -84,11 +84,24 @@ parser.add_option("-m", "--message",
help="Message for bug resolution.",
dest="resolvemessage",
action="store")
-
-
+parser.add_option("-v", "--verbose",
+ help="Print informative output.",
+ dest="verbose",
+ action="store_true",
+ default = False)
+parser.add_option("-o", "--overview" "--browse",
+ help="Launch the bug browser",
+ dest="bugbrowser",
+ action="store_true",
+ default = False)
(options,args) = parser.parse_args()
+# We copy some options to the config
+config['verbose']=options.verbose
+
+## Checking for root, tatt should be run as a user, I guess.
+## Remove on occasion.
if (Popen(['whoami'], stdout=PIPE).communicate()[0].rstrip() == 'root'):
isroot=True
else:
@@ -106,6 +119,11 @@ if options.succbugnum:
print("Failure commenting on Bugzilla")
exit(1)
+if options.bugbrowser:
+ # Launch the bugbrowser
+ launch_browser (config)
+ exit (0)
+
# Will eventuall contain packages to handle:
packs=None