[bitbake-devel] [PATCH 1/4] bitbake-diffsigs: handle if task name is specified without do_ prefix

Paul Eggleton paul.eggleton at linux.intel.com
Fri Oct 4 16:44:25 UTC 2013


Warn the user and adjust the task name automatically if the -t option
is specified with a task name that doesn't start with do_ (e.g.
"configure" instead of "do_configure").

Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
---
 bitbake/bin/bitbake-diffsigs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/bitbake/bin/bitbake-diffsigs b/bitbake/bin/bitbake-diffsigs
index 3ce70da..6e4c44a 100755
--- a/bitbake/bin/bitbake-diffsigs
+++ b/bitbake/bin/bitbake-diffsigs
@@ -39,6 +39,10 @@ def find_compare_task(bbhandler, pn, taskname):
         logger.error('Metadata does not support finding signature data files')
         sys.exit(1)
 
+    if not taskname.startswith('do_'):
+        logger.warn('Invalid task name "%s" - assuming you meant "do_%s"' % (taskname, taskname))
+        taskname = 'do_%s' % taskname
+
     filedates = bb.siggen.find_siginfo(pn, taskname, None, bbhandler.config_data)
     latestfiles = sorted(filedates.keys(), key=lambda f: filedates[f])[-2:]
     if not latestfiles:
-- 
1.8.1.2




More information about the bitbake-devel mailing list