All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH 1/2] bitbake: update help message for dump-signatures
Date: Fri, 4 Jul 2014 16:23:02 +0800	[thread overview]
Message-ID: <53B66466.1070204@windriver.com> (raw)
In-Reply-To: <1404459386.6362.94.camel@ted>



On 07/04/2014 03:36 PM, Richard Purdie wrote:
> 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@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 :(

Thanks, how about remove the type="choice" and update the help info to:

-S SIGNATURE_HANDLER, --dump-signatures=SIGNATURE_HANDLER
Dump out the signature construction information, with no task execution.
The SIGNATURE_HANDLER can be none, printdiff or other metadata defined
handlers, while none means only dump the signature, printdiff means compare
the dumped signature with the cached one.

Or drop the patch and update the user manual ?

I updated it was because when I used the bitbake -S, I didn't know there
is a very useful handler printdiff.

// Robert

>
> Cheers,
>
> Richard
>
>
>


  reply	other threads:[~2014-07-04  8:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-04  5:38 [PATCH 0/2] bitbake: update help message for dump-signatures Robert Yang
2014-07-04  5:39 ` Robert Yang
2014-07-04  5:38 ` [PATCH 1/2] " Robert Yang
2014-07-04  5:39   ` Robert Yang
2014-07-04  7:36   ` Richard Purdie
2014-07-04  8:23     ` Robert Yang [this message]
2014-07-04  5:38 ` [PATCH 2/2] bitbake-user-manual-intro.xml: update " Robert Yang
2014-07-04  5:39   ` Robert Yang
2014-07-07  6:13   ` Rifenbark, Scott M
2014-07-07  6:16     ` Robert Yang
2014-07-07  6:18       ` Rifenbark, Scott M
2014-07-21 18:18         ` Richard Purdie
2014-07-22  6:50           ` Rifenbark, Scott M
2014-07-22  8:12           ` Robert Yang
2014-07-22  8:35             ` Richard Purdie
2014-07-04  5:40 ` [PATCH 0/2] bitbake: update help message " Robert Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53B66466.1070204@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.