All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] sstatesig.py: fix logic in find_siginfo
@ 2015-01-06  7:47 Chen Qi
  2015-01-06  7:47 ` [PATCH 1/1] " Chen Qi
  0 siblings, 1 reply; 4+ messages in thread
From: Chen Qi @ 2015-01-06  7:47 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 24f19fedb40d0af84beb8e9a6595ea06f09d4615:

  gstreamer1.0-omx: use mulitple SCMs to fetch submodules (2014-12-31 08:22:53 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib ChenQi/sstatesig-logic
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/sstatesig-logic

Chen Qi (1):
  sstatesig.py: fix logic in find_siginfo

 meta/lib/oe/sstatesig.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] sstatesig.py: fix logic in find_siginfo
  2015-01-06  7:47 [PATCH 0/1] sstatesig.py: fix logic in find_siginfo Chen Qi
@ 2015-01-06  7:47 ` Chen Qi
  2015-02-04  7:12   ` ChenQi
  2015-02-04 14:47   ` Paul Eggleton
  0 siblings, 2 replies; 4+ messages in thread
From: Chen Qi @ 2015-01-06  7:47 UTC (permalink / raw)
  To: openembedded-core

For now, `bitbake-diffsig -t <recipe> <task>' doesn't work. This is
caused by a small logic mistake in find_siginfo in sstatesig.py.

The logic should be 'and' instead of 'or', otherwise, we will have
both siginfo and sigdata files in filedates which have the same checksum.
e.g.
/buildarea2/chenqi/sstate-cache/fc/sstate:sysstat:armv5te-poky-linux-gnueabi:10.2.1:r0:armv5te:3:fc861bf371c1b843b2843a3415eb5ff3_install.tgz.siginfo
/buildarea2/chenqi/poky/build-systemd/tmp/stamps/armv5te-poky-linux-gnueabi/sysstat/10.2.1-r0.do_install.sigdata.fc861bf371c1b843b2843a3415eb5ff3

So `bitbake-diffsig -t sysstat install' will output nothing even we actually
have changed something in do_install task.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/lib/oe/sstatesig.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index af7617e..c6c85b9 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -234,7 +234,7 @@ def find_siginfo(pn, taskname, taskhashlist, d):
             except OSError:
                 continue
 
-    if not taskhashlist or (len(filedates) < 2 and not foundall):
+    if not taskhashlist and (len(filedates) < 2 and not foundall):
         # That didn't work, look in sstate-cache
         hashes = taskhashlist or ['*']
         localdata = bb.data.createCopy(d)
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] sstatesig.py: fix logic in find_siginfo
  2015-01-06  7:47 ` [PATCH 1/1] " Chen Qi
@ 2015-02-04  7:12   ` ChenQi
  2015-02-04 14:47   ` Paul Eggleton
  1 sibling, 0 replies; 4+ messages in thread
From: ChenQi @ 2015-02-04  7:12 UTC (permalink / raw)
  To: openembedded-core

ping

On 01/06/2015 03:47 PM, Chen Qi wrote:
> For now, `bitbake-diffsig -t <recipe> <task>' doesn't work. This is
> caused by a small logic mistake in find_siginfo in sstatesig.py.
>
> The logic should be 'and' instead of 'or', otherwise, we will have
> both siginfo and sigdata files in filedates which have the same checksum.
> e.g.
> /buildarea2/chenqi/sstate-cache/fc/sstate:sysstat:armv5te-poky-linux-gnueabi:10.2.1:r0:armv5te:3:fc861bf371c1b843b2843a3415eb5ff3_install.tgz.siginfo
> /buildarea2/chenqi/poky/build-systemd/tmp/stamps/armv5te-poky-linux-gnueabi/sysstat/10.2.1-r0.do_install.sigdata.fc861bf371c1b843b2843a3415eb5ff3
>
> So `bitbake-diffsig -t sysstat install' will output nothing even we actually
> have changed something in do_install task.
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>   meta/lib/oe/sstatesig.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
> index af7617e..c6c85b9 100644
> --- a/meta/lib/oe/sstatesig.py
> +++ b/meta/lib/oe/sstatesig.py
> @@ -234,7 +234,7 @@ def find_siginfo(pn, taskname, taskhashlist, d):
>               except OSError:
>                   continue
>   
> -    if not taskhashlist or (len(filedates) < 2 and not foundall):
> +    if not taskhashlist and (len(filedates) < 2 and not foundall):
>           # That didn't work, look in sstate-cache
>           hashes = taskhashlist or ['*']
>           localdata = bb.data.createCopy(d)



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] sstatesig.py: fix logic in find_siginfo
  2015-01-06  7:47 ` [PATCH 1/1] " Chen Qi
  2015-02-04  7:12   ` ChenQi
@ 2015-02-04 14:47   ` Paul Eggleton
  1 sibling, 0 replies; 4+ messages in thread
From: Paul Eggleton @ 2015-02-04 14:47 UTC (permalink / raw)
  To: Chen Qi; +Cc: openembedded-core

Hi Qi,

On Tuesday 06 January 2015 15:47:38 Chen Qi wrote:
> For now, `bitbake-diffsig -t <recipe> <task>' doesn't work. This is
> caused by a small logic mistake in find_siginfo in sstatesig.py.
> 
> The logic should be 'and' instead of 'or', otherwise, we will have
> both siginfo and sigdata files in filedates which have the same checksum.
> e.g.
> /buildarea2/chenqi/sstate-cache/fc/sstate:sysstat:armv5te-poky-linux-gnueabi
> :10.2.1:r0:armv5te:3:fc861bf371c1b843b2843a3415eb5ff3_install.tgz.siginfo
> /buildarea2/chenqi/poky/build-systemd/tmp/stamps/armv5te-poky-linux-gnueabi
> /sysstat/10.2.1-r0.do_install.sigdata.fc861bf371c1b843b2843a3415eb5ff3
> 
> So `bitbake-diffsig -t sysstat install' will output nothing even we actually
> have changed something in do_install task.
> 
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  meta/lib/oe/sstatesig.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
> index af7617e..c6c85b9 100644
> --- a/meta/lib/oe/sstatesig.py
> +++ b/meta/lib/oe/sstatesig.py
> @@ -234,7 +234,7 @@ def find_siginfo(pn, taskname, taskhashlist, d):
>              except OSError:
>                  continue
> 
> -    if not taskhashlist or (len(filedates) < 2 and not foundall):
> +    if not taskhashlist and (len(filedates) < 2 and not foundall):

I don't think this is the correct fix - if taskhashlist is specified but we 
don't have enough files found in the stamps directory, we still want to look at 
the sstate cache.

It is difficult to tell what's going on in this function, because this code is 
now being used for several different purposes:

 (1) the bitbake-diffsigs -t usage which is intended to be used to find out what 
changed that caused a task to re-execute the last time (so we want the two 
newest signatures).

 (2) the bitbake -S printdiff usage which is intended to be used simply to find 
out why sstate wasn't reused (so we want the two signatures with the smallest 
difference)

 (3) Additionally, as part of (1) and (2) the same function is also called 
with specific task hashes which changes its behaviour.

I think this code should probably be refactored so it makes more sense, but 
the minimal fix for the problem you discovered would be to make the bit that 
looks in sstate-cache ignore hashes it has already found.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-02-04 14:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-06  7:47 [PATCH 0/1] sstatesig.py: fix logic in find_siginfo Chen Qi
2015-01-06  7:47 ` [PATCH 1/1] " Chen Qi
2015-02-04  7:12   ` ChenQi
2015-02-04 14:47   ` Paul Eggleton

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.