[bitbake-devel] [PATCH 1/2] bitbake: update help message for dump-signatures
Richard Purdie
richard.purdie at linuxfoundation.org
Fri Jul 4 07:36:26 UTC 2014
On Thu, 2014-07-03 at 22:39 -0700, Robert Yang wrote:
> The bitbake -S had been updated which always reuires an argument, so
> update the help info:
> - Add the two args in the help message: none and printdiff
>
> - Use type="choice" so that we can get more friendly error messages,
> for example:
> bitbake: error: option -S: invalid choice: 'printdiffX' (choose from 'none', 'printdiff')
>
> - dump-signatures=DUMP_SIGNATURES -> dump-signatures=SIGNATURE_HANDLER
>
> Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
> ---
> bitbake/bin/bitbake | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
> index b3acbe1..5c25a9d 100755
> --- a/bitbake/bin/bitbake
> +++ b/bitbake/bin/bitbake
> @@ -139,8 +139,8 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
> parser.add_option("-n", "--dry-run", help = "Don't execute, just go through the motions.",
> action = "store_true", dest = "dry_run", default = False)
>
> - parser.add_option("-S", "--dump-signatures", help = "Dump out the signature construction information, with no task execution. Parameters are passed to the signature handling code, use 'none' if no specific handler is required.",
> - action = "append", dest = "dump_signatures", default = [])
> + parser.add_option("-S", "--dump-signatures", help = "Dump out the signature construction information, with no task execution. The SIGNATURE_HANDLER can be none or printdiff, while none means only dump the signature, printdiff means compare the dumped signature with the cached one.",
> + action = "append", dest = "dump_signatures", default = [], type="choice", choices=("none", "printdiff"), metavar="SIGNATURE_HANDLER")
The problem here is the different options are (or will be) metadata
defined and bitbake can't know which options may or may not be valid :(
Cheers,
Richard
More information about the bitbake-devel
mailing list