|
@@ -67,16 +67,24 @@ parser = optparse.OptionParser(
|
|
|
%prog -t recipename taskname
|
|
|
%prog sigdatafile""")
|
|
|
|
|
|
+parser.add_option("-D", "--debug",
|
|
|
+ help = "enable debug",
|
|
|
+ action = "store_true", dest="debug", default = False)
|
|
|
+
|
|
|
parser.add_option("-t", "--task",
|
|
|
help = "find the signature data file for the specified task",
|
|
|
action="store", dest="taskargs", nargs=2, metavar='recipename taskname')
|
|
|
|
|
|
options, args = parser.parse_args(sys.argv)
|
|
|
|
|
|
+if options.debug:
|
|
|
+ logger.setLevel(logging.DEBUG)
|
|
|
+
|
|
|
if options.taskargs:
|
|
|
tinfoil = bb.tinfoil.Tinfoil()
|
|
|
tinfoil.prepare(config_only = True)
|
|
|
file = find_siginfo_task(tinfoil, options.taskargs[0], options.taskargs[1])
|
|
|
+ logger.debug("Signature file: %s" % file)
|
|
|
elif len(args) == 1:
|
|
|
parser.print_help()
|
|
|
sys.exit(0)
|