]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: bitbake-dumpsig: Add debug support
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Sat, 11 Mar 2017 05:22:16 +0000 (06:22 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 23 Mar 2017 13:19:49 +0000 (13:19 +0000)
Currently shows the name of the signature file that was found when
--task is used.

(Bitbake rev: 84533c6dbd175a51f4dd59735161adfd10056888)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/bin/bitbake-dumpsig

index b1fce2510dc046740d9089b71ea4a844e2046a10..38efd2286481b91fd911960f8c07cc970287cda1 100755 (executable)
@@ -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)