image.bbclass: delete DATE variable too
PATCH 1/1 image.bbclass: delete DATE variable too
From: Stefan Agner <[email protected]>
When creating a custom image which uses the DATE variable the basehash
seems to change every day and lead to errors such as:
ERROR: console-tdx-image-2.7.6-r0 do_image_customimg: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:set_image_size(d)
...
Add DATE to the variables which should not get expanded early and to the vardepsexclude list for the image task.
---
I am not that deep in OE usually and I am not sure if I miss something completely here... It seems to solve the issue for us though. Does that change sounds reasonable? Could it be done in the custom image class file?
meta/classes/image.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes/image.bbclass +2 -1
@@ -440,6 +440,7 @@ python () { # date/time values. It will get expanded at execution time. # Similarly TMPDIR since otherwise we see QA stamp comparision problems localdata.delVar('DATETIME') + localdata.delVar('DATE') localdata.delVar('TMPDIR') image_cmd = localdata.getVar("IMAGE_CMD", True)
@@ -503,7 +504,7 @@ python () { d.setVarFlag('do_image_%s' % t, 'postfuncs', 'create_symlinks') d.setVarFlag('do_image_%s' % t, 'subimages', ' '.join(subimages)) d.appendVarFlag('do_image_%s' % t, 'vardeps', ' '.join(vardeps)) - d.appendVarFlag('do_image_%s' % t, 'vardepsexclude', 'DATETIME') + d.appendVarFlag('do_image_%s' % t, 'vardepsexclude', 'DATETIME DATE') bb.debug(2, "Adding type %s before %s, after %s" % (t, 'do_image_complete', after)) bb.build.addtask('do_image_%s' % t, 'do_image_complete', after, d)
Signature · 1 line
2.7.4
✗ patchtest: failure for image.bbclass: delete DATE variable too
== Series Details ==
Series: image.bbclass: delete DATE variable too
Revision: 1
URL : https://patchwork.openembedded.org/series/8180/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at df7f5221a5)
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
two recipes, one replaces files of another
In reply to Stefan AgnerGood time of day, people!
I have two recipes for two cases:
recipe-brdRevA.bb
recipe-brdRevB.bb
both of them has one file:/etc/myprog/c.conf
and two image definition files:
imgA.bb
imgB.bb
, that requires recipe-brdRevA.bb or recipe-brdRevB.bb indirectly by IMAGE_INSTALL += "myprog"
myprog.bb requires files from recipe-brdRevA or recipe-brdRevB, depending on image.
It's not a correct idea to add IMAGE_INSTALL += "recipe-brdRev<N>" into img<N>.bb explicitely.
How to create dependencies correctly?
I try to add
RPROVIDES_${PN} += "recipe-brd" in both recipe-brdRevA/B and use PREFERRED_PROVIDER_recipe-brd = "..." into imgA/B.bb without success.
Please, advice me.
begin:vcard
fn:Dmitry Dvorkin
n:Dvorkin;Dmitry
org:Tibbo Technology Inc.;Tibbo Engeneering
adr:;;9F-3, No.31, Lane 169, Kang-Ning St., Hsi-Chih, New Taipei City;Taipei;Taipei;22180;Taiwan email;internet:[email protected]
title:Embedded Linux System Architect
url:http://tibbo.com/
version:2.1
end:vcard
Re: two recipes, one replaces files of another
Quoted 4 lines · Dvorkin Dmitry
How to create dependencies correctly?
I try to add
RPROVIDES_${PN} += "recipe-brd" in both recipe-brdRevA/B and use PREFERRED_PROVIDER_recipe-brd = "..." into imgA/B.bb without success.
PREFERRED_PROVIDER is the right way to go. That's how a kernel variant is selected from multiple choices (regular, tiny, real time) for example - have a look at how it's done.
Alex
Re: two recipes, one replaces files of another
Thank you, Alexander!
But according to this
https://lists.yoctoproject.org/pipermail/yocto/2013-January/011855.html
PREFERRED_PROVIDER_... can't be used in image recipes, only at top-level configuration files.
I can't make it work...
Quoted 9 lines · Alexander Kanavin
Quoted 4 lines · Dvorkin Dmitry
How to create dependencies correctly?
I try to add
RPROVIDES_${PN} += "recipe-brd" in both recipe-brdRevA/B and use PREFERRED_PROVIDER_recipe-brd = "..." into imgA/B.bb without success.
PREFERRED_PROVIDERis the right way to go. That's how a kernel variant is selected from multiple choices (regular, tiny, real time) for example - have a look at how it's done.Alex
begin:vcard
fn:Dmitry Dvorkin
n:Dvorkin;Dmitry
org:Tibbo Technology Inc.;Tibbo Engeneering
adr:;;9F-3, No.31, Lane 169, Kang-Ning St., Hsi-Chih, New Taipei City;Taipei;Taipei;22180;Taiwan email;internet:[email protected]
title:Embedded Linux System Architect
url:http://tibbo.com/
version:2.1
end:vcard
Re: two recipes, one replaces files of another
Quoted 9 lines · Dvorkin Dmitry
Thank you, Alexander!
But according to this
https://lists.yoctoproject.org/pipermail/yocto/2013-January/011855.html
PREFERRED_PROVIDER_... can't be used in image recipes, only at top-level configuration files.I can't make it work...
I think you can solve this by defining two machines: brdRevA and brdRevB. Then set PREFERRED_PROVIDER in the machine definitions. And have just one recipe for the image.
You should not make image recipes hardware-specific anyway; any image recipe should work on any hardware, and details specific to the hardware are abstracted to the machine definition.
Alex
Re: two recipes, one replaces files of another
Thanks!
The problem is that this two machines are the same, except only one configuration file.
Bootloader files are build for two machines with the same image. Linux kernel is the same the small difference is in two separate DTS files only. Everything else is the same.
I don't like dirty hacks. If somebody knows the good way to set preference in non-root configuration files - please, advice me.
Quoted 12 lines · Alexander Kanavin
Quoted 9 lines · Dvorkin Dmitry
Thank you, Alexander!
But according to this
https://lists.yoctoproject.org/pipermail/yocto/2013-January/011855.html
PREFERRED_PROVIDER_... can't be used in image recipes, only at top-level configuration files.I can't make it work...
Quoted 6 lines
I think you can solve this by defining two machines: brdRevA and brdRevB. Then set
PREFERRED_PROVIDERin the machine definitions. And have just one recipe for the image.You should not make image recipes hardware-specific anyway; any image recipe should work on any hardware, and details specific to the hardware are abstracted to the machine definition.
Alex
begin:vcard
fn:Dmitry Dvorkin
n:Dvorkin;Dmitry
org:Tibbo Technology Inc.;Tibbo Engeneering
adr:;;9F-3, No.31, Lane 169, Kang-Ning St., Hsi-Chih, New Taipei City;Taipei;Taipei;22180;Taiwan email;internet:[email protected]
title:Embedded Linux System Architect
url:http://tibbo.com/
version:2.1
end:vcard