All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Hatle <mark.hatle@windriver.com>
To: <bitbake-devel@lists.openembedded.org>
Subject: Re: [PATCH] siggen: add quotes around variable values to see whitespace
Date: Mon, 4 Mar 2013 09:49:06 -0600	[thread overview]
Message-ID: <5134C272.7090008@windriver.com> (raw)
In-Reply-To: <1362243005-12124-1-git-send-email-Martin.Jansa@gmail.com>

On 3/2/13 10:50 AM, Martin Jansa wrote:
> * without this change it's hard to see what's changed:
>    bitbake-diffsigs sstate-cache/*/sstate-depmodwrapper-cross-cortexa8-vfp-neon-oe-linux-gnueabi-1.0-r0-cortexa8-vfp-neon-*_populate-sysroot.tgz.siginfo
>    basehash changed from 62f28c13172d38af917716d6d4b15ac5 to 9cf38842bcc79e0a4356856a64141548
>    Variable TUNE_CCARGS value changed from  -march=armv7-a    -mthumb -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8  to  -march=armv7-a    -mthumb -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8
>    Hash for dependent task depmodwrapper-cross_1.0.bb.do_install changed from 4494cb6c117309a9b4c541ad86c0aac5 to 1e3bcf2d14e5bd30a38350b41bb98db3
>
> * with this change, we can see extra trailing space in first version:
>    basehash changed from 62f28c13172d38af917716d6d4b15ac5 to 9cf38842bcc79e0a4356856a64141548
>    Variable TUNE_CCARGS value changed from ' -march=armv7-a    -mthumb -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 ' to ' -march=armv7-a    -mthumb -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8'
>    Hash for dependent task depmodwrapper-cross_1.0.bb.do_install changed from 4494cb6c117309a9b4c541ad86c0aac5 to 1e3bcf2d14e5bd30a38350b41bb98db3

No objection to this patch, but it does raise the question.  Should we somehow 
strip the leading and training white space, maybe even multiple spaces (like 
above) and then use the results to generate the checksum?

If I saw the above, my first comment would be "well that's stupid, the output is 
the same"..  (Of course performance might be impacted by all of that stripping..)

--Mark

> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>   lib/bb/siggen.py | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py
> index 50e4558..8861337 100644
> --- a/lib/bb/siggen.py
> +++ b/lib/bb/siggen.py
> @@ -331,12 +331,12 @@ def compare_sigfiles(a, b, recursecb = None):
>           return changed, added, removed
>
>       if 'basewhitelist' in a_data and a_data['basewhitelist'] != b_data['basewhitelist']:
> -        output.append("basewhitelist changed from %s to %s" % (a_data['basewhitelist'], b_data['basewhitelist']))
> +        output.append("basewhitelist changed from '%s' to '%s'" % (a_data['basewhitelist'], b_data['basewhitelist']))
>           if a_data['basewhitelist'] and b_data['basewhitelist']:
>               output.append("changed items: %s" % a_data['basewhitelist'].symmetric_difference(b_data['basewhitelist']))
>
>       if 'taskwhitelist' in a_data and a_data['taskwhitelist'] != b_data['taskwhitelist']:
> -        output.append("taskwhitelist changed from %s to %s" % (a_data['taskwhitelist'], b_data['taskwhitelist']))
> +        output.append("taskwhitelist changed from '%s' to '%s'" % (a_data['taskwhitelist'], b_data['taskwhitelist']))
>           if a_data['taskwhitelist'] and b_data['taskwhitelist']:
>               output.append("changed items: %s" % a_data['taskwhitelist'].symmetric_difference(b_data['taskwhitelist']))
>
> @@ -349,7 +349,7 @@ def compare_sigfiles(a, b, recursecb = None):
>       changed, added, removed = dict_diff(a_data['gendeps'], b_data['gendeps'], a_data['basewhitelist'] & b_data['basewhitelist'])
>       if changed:
>           for dep in changed:
> -            output.append("List of dependencies for variable %s changed from %s to %s" % (dep, a_data['gendeps'][dep], b_data['gendeps'][dep]))
> +            output.append("List of dependencies for variable %s changed from '%s' to '%s'" % (dep, a_data['gendeps'][dep], b_data['gendeps'][dep]))
>               if a_data['gendeps'][dep] and b_data['gendeps'][dep]:
>                   output.append("changed items: %s" % a_data['gendeps'][dep].symmetric_difference(b_data['gendeps'][dep]))
>       if added:
> @@ -363,7 +363,7 @@ def compare_sigfiles(a, b, recursecb = None):
>       changed, added, removed = dict_diff(a_data['varvals'], b_data['varvals'])
>       if changed:
>           for dep in changed:
> -            output.append("Variable %s value changed from %s to %s" % (dep, a_data['varvals'][dep], b_data['varvals'][dep]))
> +            output.append("Variable %s value changed from '%s' to '%s'" % (dep, a_data['varvals'][dep], b_data['varvals'][dep]))
>
>       changed, added, removed = dict_diff(a_data['file_checksum_values'], b_data['file_checksum_values'])
>       if changed:
>




  reply	other threads:[~2013-03-04 16:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-02 16:50 [PATCH] siggen: add quotes around variable values to see whitespace Martin Jansa
2013-03-04 15:49 ` Mark Hatle [this message]
2013-03-04 18:24   ` Martin Jansa
2013-03-07 10:49     ` Richard Purdie
2013-03-07 10:48   ` Richard Purdie

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=5134C272.7090008@windriver.com \
    --to=mark.hatle@windriver.com \
    --cc=bitbake-devel@lists.openembedded.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.