Re: [OE-core] [PATCH 5/9] lib/oe/sstatesig.py: add an option to make a unihash cache copy

2024-06-04 Thread Richard Purdie
On Tue, 2024-05-07 at 13:46 +0200, Alexander Kanavin via lists.openembedded.org 
wrote:
> From: Alexander Kanavin 
> 
> This is already performed in eSDK creation; the change allows also
> making a copy with a standalone 'bitbake -S unihash-cache-copy targets...'
> command, which is useful for replicating builds on a different build host
> (simply coping sstate objects is not enough if they need to be discovered
> through unihash redirections).
> 
> Signed-off-by: Alexander Kanavin 
> ---
>  meta/lib/oe/sstatesig.py | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
> index a46e5502ab3..5dfd180e7f2 100644
> --- a/meta/lib/oe/sstatesig.py
> +++ b/meta/lib/oe/sstatesig.py
> @@ -147,6 +147,10 @@ class SignatureGeneratorOEBasicHashMixIn(object):
>  sigfile = os.getcwd() + "/locked-sigs.inc"
>  bb.plain("Writing locked sigs to %s" % sigfile)
>  self.dump_lockedsigs(sigfile)
> +    if 'unihash-cache-copy' in options:
> +    cachefile = os.getcwd() + "/bb_unihashes.dat"
> +    bb.plain("Writing unihash cache to %s" % cachefile)
> +    bb.parse.siggen.copy_unitaskhashes(os.getcwd())
>  return super(bb.siggen.SignatureGeneratorBasicHash, 
> self).dump_sigs(dataCache, options)
>  

I think we can drop the piece above now after this:

https://git.yoctoproject.org/poky/commit/?id=652e3028d9763aef318ff4587f2c21a8b280003f

The copy_unitaskhashes code is really problematic within bitbake and
was a horrible hack/workaround anyway so it needs to be removed.

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#200324): 
https://lists.openembedded.org/g/openembedded-core/message/200324
Mute This Topic: https://lists.openembedded.org/mt/105958243/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 5/9] lib/oe/sstatesig.py: add an option to make a unihash cache copy

2024-05-07 Thread Alexander Kanavin
From: Alexander Kanavin 

This is already performed in eSDK creation; the change allows also
making a copy with a standalone 'bitbake -S unihash-cache-copy targets...'
command, which is useful for replicating builds on a different build host
(simply coping sstate objects is not enough if they need to be discovered
through unihash redirections).

Signed-off-by: Alexander Kanavin 
---
 meta/lib/oe/sstatesig.py | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index a46e5502ab3..5dfd180e7f2 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -147,6 +147,10 @@ class SignatureGeneratorOEBasicHashMixIn(object):
 sigfile = os.getcwd() + "/locked-sigs.inc"
 bb.plain("Writing locked sigs to %s" % sigfile)
 self.dump_lockedsigs(sigfile)
+if 'unihash-cache-copy' in options:
+cachefile = os.getcwd() + "/bb_unihashes.dat"
+bb.plain("Writing unihash cache to %s" % cachefile)
+bb.parse.siggen.copy_unitaskhashes(os.getcwd())
 return super(bb.siggen.SignatureGeneratorBasicHash, 
self).dump_sigs(dataCache, options)
 
 
-- 
2.39.2


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#199088): 
https://lists.openembedded.org/g/openembedded-core/message/199088
Mute This Topic: https://lists.openembedded.org/mt/105958243/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-